diff options
author | Martin Storsjö <martin@martin.st> | 2013-09-29 00:38:50 +0300 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-10-04 03:52:10 +0200 |
commit | 812955a12b190012c134be33a93f27308953eb2f (patch) | |
tree | 74b1d0e1f974e562f19a09acd5b9f61e4f892dd7 | |
parent | a63e83cd4b43c3dcef38f7fefe41c002a263af0f (diff) | |
download | ffmpeg-812955a12b190012c134be33a93f27308953eb2f.tar.gz |
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@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 9fb0de86b49e9fb0709a8ad1e1875e35da841887)
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rw-r--r-- | libavcodec/pcx.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c index ba3703a712..9c79aff1ae 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; } |