someone added an awesome bug to bmp loader some time recently. fix!

SVN revision: 66897
This commit is contained in:
Carsten Haitzler 2012-01-05 10:06:49 +00:00
parent 2f6b837c7c
commit c3a3eb0583
1 changed files with 3 additions and 0 deletions

View File

@ -417,6 +417,9 @@ evas_image_load_file_data_bmp(Image_Entry *ie, const char *file, const char *key
fsize = eina_file_size_get(f);
if (fsize < 2) goto close_file;
map = eina_file_map_all(f, EINA_FILE_SEQUENTIAL);
if (!map) goto close_file;
if (strncmp(map, "BM", 2)) goto close_file; // magic number
position += 2;
*error = EVAS_LOAD_ERROR_CORRUPT_FILE;