summaryrefslogtreecommitdiffstats
path: root/libavcodec/flicvideo.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-24 13:15:52 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-24 13:15:59 +0100
commit663ebae79a3e556d8be5004057f805dd82e21062 (patch)
tree6ac81137a69515c7b4180deeea159b6116f7235c /libavcodec/flicvideo.c
parentea2de3d09614fcfe53b9406cce57a1bf8cf6d5cd (diff)
parent56daf10e0313c5e36f43e773f457d2a99ff0df10 (diff)
downloadffmpeg-streaming-663ebae79a3e556d8be5004057f805dd82e21062.zip
ffmpeg-streaming-663ebae79a3e556d8be5004057f805dd82e21062.tar.gz
Merge commit '56daf10e0313c5e36f43e773f457d2a99ff0df10'
* commit '56daf10e0313c5e36f43e773f457d2a99ff0df10': mov: use the format context for logging. flicvideo: avoid an infinite loop in byte run compression Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/flicvideo.c')
-rw-r--r--libavcodec/flicvideo.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c
index 9e35f48..2f8cd33 100644
--- a/libavcodec/flicvideo.c
+++ b/libavcodec/flicvideo.c
@@ -387,6 +387,11 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
if (bytestream2_tell(&g2) + 1 > stream_ptr_after_chunk)
break;
byte_run = sign_extend(bytestream2_get_byte(&g2), 8);
+ if (!byte_run) {
+ av_log(avctx, AV_LOG_ERROR, "Invalid byte run value.\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (byte_run > 0) {
palette_idx1 = bytestream2_get_byte(&g2);
CHECK_PIXEL_PTR(byte_run);
OpenPOWER on IntegriCloud