when texture upload using memcpy case, sometimes crash happens in enlightenment.
it may be memory corruption problem when alloac is failed because of Stack overflow
so i replace alloca to malloc for avoid stack overflow
Change-Id: I20ad80df73d9e63d832acfdf4a281743841b6b46
dh = im->cache_entry.h + 2;
sw = im->cache_entry.w;
sh = im->cache_entry.h;
- DATA32 * temp = alloca (dw * dh * bytes_count);
+ DATA32 * temp = malloc (dw * dh * bytes_count);
+ if(!temp)
+ {
+ ERR("memory allocation is failed..");
+ return;
+ }
DATA8 *dp = (unsigned char *)temp;
DATA8 *sp = (unsigned char *)im->image.data;
int i;
// xxxxx
memcpy(dp, dp + (dw * bytes_count), dw * bytes_count);
_tex_sub_2d(tex->gc, tex->x - 1, tex->y - 1, dw, dh, fmt, tex->pt->dataformat, temp);
+ free(temp);
}
else
{