GNOME Bugzilla – Bug 635747
[PATCH] png load doesn't check for failed reads and short files
Last modified: 2010-12-20 20:39:25 UTC
Created attachment 175215 [details] [review] A patch to fix the problem. operations/external/png-load.c doesn't check for failed reads when reading a png file. Add check and at Martin Nordhalts request, move it into a routine that opens the file, checks the header to validate that it's really a png file, then returns the handle.
commit 6c4fe8ab610457517907afa6156698139af1e9d8 Author: Patrick Horgan <phorgan1@gmail.com> Date: Fri Nov 19 18:31:34 2010 -0800 png-load: check for failed read Check fread return status for error so that if the file is short, then will able to give a more meaningful error. Also abstract current code out of two routines that open the file and read it.