Merge commit '56daf10e0313c5e36f43e773f457d2a99ff0df10'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Feb 2013 12:15:52 +0000 (13:15 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Feb 2013 12:15:59 +0000 (13:15 +0100)
* 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>
1  2 
libavcodec/flicvideo.c
libavformat/mov.c

@@@ -384,9 -347,12 +384,14 @@@ static int flic_decode_frame_8BPP(AVCod
                   bytestream2_skip(&g2, 1);
                  pixel_countdown = s->avctx->width;
                  while (pixel_countdown > 0) {
 +                    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);
Simple merge