someone added an awesome bug to bmp loader some time recently. fix!
authorCarsten Haitzler <raster@rasterman.com>
Thu, 5 Jan 2012 10:06:49 +0000 (10:06 +0000)
committerCarsten Haitzler <raster@rasterman.com>
Thu, 5 Jan 2012 10:06:49 +0000 (10:06 +0000)
SVN revision: 66897

legacy/evas/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;