projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
configure: Bump SOURCE_DATE_EPOCH
[privoxy.git]
/
deanimate.c
diff --git
a/deanimate.c
b/deanimate.c
index
b0f3f1f
..
a6759da
100644
(file)
--- a/
deanimate.c
+++ b/
deanimate.c
@@
-333,6
+333,10
@@
int gif_deanimate(struct binbuffer *src, struct binbuffer *dst, int get_first_im
{
return 1;
}
{
return 1;
}
+ if (src->size <= 10)
+ {
+ return 1;
+ }
c = buf_getbyte(src, 10);
c = buf_getbyte(src, 10);
@@
-383,9
+387,11
@@
int gif_deanimate(struct binbuffer *src, struct binbuffer *dst, int get_first_im
switch(buf_getbyte(src, 0))
{
/*
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:
*/
case 0x3b:
+ if (image->size == 0) goto failed;
goto write;
/*
goto write;
/*