Fix potention buffer overflow

This commit is contained in:
Daniel Zaoui 2018-06-04 13:35:18 +03:00
parent ab22f74b0a
commit 4b5ced9b07
1 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ exactness_unit_file_read(const char *filename)
unit = eet_data_read(file, _unit_desc_make(), "cache");
for (i = 0; i < unit->nb_shots; i++)
{
char entry[16];
char entry[32];
Exactness_Image *ex_img = malloc(sizeof(*ex_img));
sprintf(entry, "images/%d", i + 1);
ex_img->pixels = eet_data_image_read(file, entry,
@ -313,7 +313,7 @@ exactness_unit_file_write(Exactness_Unit *unit, const char *filename)
eet_data_write(file, _unit_desc_make(), "cache", unit, EINA_TRUE);
EINA_LIST_FOREACH(unit->imgs, itr, ex_img)
{
char entry[16];
char entry[32];
sprintf(entry, "images/%d", i++);
eet_data_image_write(file, entry,
ex_img->pixels, ex_img->w, ex_img->h, 0xFF,