[Privoxy-commits] [privoxy] 03/06: gif_deanimate(): Confirm we've got an image before trying to write it
User Git
git at git.privoxy.org
Sun Feb 21 16:27:06 UTC 2021
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository privoxy.
commit 344963815c5b29449042487d942fc12f43144295
Author: Fabian Keil <fk at fabiankeil.de>
AuthorDate: Sat Feb 6 12:13:32 2021 +0100
gif_deanimate(): Confirm we've got an image before trying to write it
Saves a pointless buf_copy() call.
---
deanimate.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/deanimate.c b/deanimate.c
index b0f3f1f8..bc64de63 100644
--- 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;
/*
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Privoxy-commits
mailing list