someone added an awesome bug to bmp loader some time recently. fix!
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 5 Jan 2012 10:06:49 +0000 (10:06 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 5 Jan 2012 10:06:49 +0000 (10:06 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@66897 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/modules/loaders/bmp/evas_image_load_bmp.c

index 3c0d521..6d15783 100644 (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;