Enlightenment CVS committal Author : raster Project : e17 Module : libs/evas
Dir : e17/libs/evas/src/modules/loaders/png Modified Files: evas_image_load_png.c Log Message: fix unknown buffer content chekc problems =================================================================== RCS file: /cvs/e/e17/libs/evas/src/modules/loaders/png/evas_image_load_png.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -3 -r1.6 -r1.7 --- evas_image_load_png.c 25 Aug 2007 02:36:18 -0000 1.6 +++ evas_image_load_png.c 28 Oct 2007 10:08:32 -0000 1.7 @@ -39,7 +39,11 @@ if (!f) return 0; /* if we havent read the header before, set the header data */ - fread(buf, 1, PNG_BYTES_TO_CHECK, f); + if (fread(buf, 1, PNG_BYTES_TO_CHECK, f) != 1) + { + fclose(f); + return 0; + } if (!png_check_sig(buf, PNG_BYTES_TO_CHECK)) { fclose(f); ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs