summaryrefslogtreecommitdiff
path: root/src/modules/evas/loaders/bmp/evas_image_load_bmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/evas/loaders/bmp/evas_image_load_bmp.c')
-rw-r--r--src/modules/evas/loaders/bmp/evas_image_load_bmp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/evas/loaders/bmp/evas_image_load_bmp.c b/src/modules/evas/loaders/bmp/evas_image_load_bmp.c
index 173561b037..225f04b728 100644
--- a/src/modules/evas/loaders/bmp/evas_image_load_bmp.c
+++ b/src/modules/evas/loaders/bmp/evas_image_load_bmp.c
@@ -135,6 +135,7 @@ evas_image_load_file_head_bmp(Image_Entry *ie, const char *file, const char *key
135 if (!read_ushort(map, fsize, &position, &res2)) goto close_file; 135 if (!read_ushort(map, fsize, &position, &res2)) goto close_file;
136 if (!read_uint(map, fsize, &position, &offset)) goto close_file; 136 if (!read_uint(map, fsize, &position, &offset)) goto close_file;
137 if (!read_uint(map, fsize, &position, &head_size)) goto close_file; 137 if (!read_uint(map, fsize, &position, &head_size)) goto close_file;
138 if (offset > fsize) goto close_file;
138 if (head_size == 12) // OS/2 V1 + Windows 3.0 139 if (head_size == 12) // OS/2 V1 + Windows 3.0
139 { 140 {
140 short tmp; 141 short tmp;
@@ -424,6 +425,7 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
424 if (!read_ushort(map, fsize, &position, &res2)) goto close_file; 425 if (!read_ushort(map, fsize, &position, &res2)) goto close_file;
425 if (!read_uint(map, fsize, &position, &offset)) goto close_file; 426 if (!read_uint(map, fsize, &position, &offset)) goto close_file;
426 if (!read_uint(map, fsize, &position, &head_size)) goto close_file; 427 if (!read_uint(map, fsize, &position, &head_size)) goto close_file;
428 if (offset > fsize) goto close_file;
427 image_size = fsize - offset; 429 image_size = fsize - offset;
428 if (image_size < 1) goto close_file; 430 if (image_size < 1) goto close_file;
429 431