Just feeling my way in here, and it seemed an easy fix
to get rid of a warning that uncovered an error. fread
return value was being ignored when checking header of
a png file, and if the file was truncated it would have
caused other errors. Better to catch the error and
abort then instead o
Thanks! A few comments:
On 11/10/2010 02:02 AM, Patrick Horgan wrote:
> + if(fread (header, 1, 8, infile)!=8)
No magic numbers please, use a define for at least 8
> + g_warning ("%s is not a valid png file", path);
You should give a more detailed error message than just "is not valid"
>
2 matches
Mail list logo