{
return 1;
}
+ if (src->size <= 10)
+ {
+ return 1;
+ }
c = buf_getbyte(src, 10);
switch(buf_getbyte(src, 0))
{
/*
- * End-of-GIF Marker: Append current image and return
+ * End-of-GIF Marker: Append current image if we got
+ * one and return.
*/
case 0x3b:
+ if (image->size == 0) goto failed;
goto write;
/*