[FFmpeg-cvslog] pcx: Consume the whole packet if giving up due to missing palette
Martin Storsjö
git at videolan.org
Tue Oct 8 01:46:06 CEST 2013
ffmpeg | branch: release/1.1 | Martin Storsjö <martin at martin.st> | Sun Sep 29 00:38:50 2013 +0300| [812955a12b190012c134be33a93f27308953eb2f] | committer: Luca Barbato
pcx: Consume the whole packet if giving up due to missing palette
Previously, we returned 0, meaning successful decoding but 0
bytes consumed, leading to an infinite loop.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable at libav.org
Signed-off-by: Martin Storsjö <martin at martin.st>
(cherry picked from commit 9fb0de86b49e9fb0709a8ad1e1875e35da841887)
Signed-off-by: Luca Barbato <lu_zero at gentoo.org>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=812955a12b190012c134be33a93f27308953eb2f
---
libavcodec/pcx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index ba3703a..9c79aff 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -196,6 +196,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
}
if (*buf++ != 12) {
av_log(avctx, AV_LOG_ERROR, "expected palette after image data\n");
+ ret = buf_size;
goto end;
}
More information about the ffmpeg-cvslog
mailing list