Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2017-06-28 18:14:30 +0300
committerPaul B Mahol <onemda@gmail.com>2017-06-28 18:14:30 +0300
commited782bebf508d4a27e1beaa040035bf84376f359 (patch)
tree875023a3deffe82486e244a1d8868ff30ac4eba5 /libavcodec/interplayvideo.c
parent613ccdaaacaac596e9b63747fe4ca32772a3a6ee (diff)
avcodec/interplayvideo: fix dead-lock
Fixes #6499. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 1a1aa96ac7..8ccd20019f 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -1044,7 +1044,7 @@ static void ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame)
for (x = 0; x < s->avctx->width; x += 8) {
s->pixel_ptr = s->cur_decode_frame->data[0] + x + y * s->cur_decode_frame->linesize[0];
- while (skip <= 0) {
+ while (skip <= 0 && bytestream2_get_bytes_left(&decoding_map_ptr) > 1) {
if (skip != -0x8000 && skip) {
opcode = bytestream2_get_le16(&decoding_map_ptr);
ipvideo_format_10_passes[pass](s, frame, opcode);
@@ -1069,6 +1069,8 @@ static void ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame)
changed_block = 1;
break;
}
+ if (bytestream2_get_bytes_left(&skip_map_ptr) < 2)
+ return AVERROR_INVALIDDATA;
skip = bytestream2_get_le16(&skip_map_ptr);
}