projects
/
privoxy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
647353d
)
gif_deanimate(): Confirm we've got an image before trying to write it
author
Fabian Keil
<fk@fabiankeil.de>
Sat, 6 Feb 2021 11:13:32 +0000
(12:13 +0100)
committer
Fabian Keil
<fk@fabiankeil.de>
Sun, 21 Feb 2021 16:30:16 +0000
(17:30 +0100)
Saves a pointless buf_copy() call.
deanimate.c
patch
|
blob
|
history
diff --git
a/deanimate.c
b/deanimate.c
index
b0f3f1f
..
bc64de6
100644
(file)
--- a/
deanimate.c
+++ b/
deanimate.c
@@
-383,9
+383,11
@@
int gif_deanimate(struct binbuffer *src, struct binbuffer *dst, int get_first_im
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;
/*