Merge commit 'f935aca44c674d30e3ed940ef73bbad1228a5855'
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Feb 2013 11:22:51 +0000 (12:22 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Sun, 24 Feb 2013 11:22:51 +0000 (12:22 +0100)
* commit 'f935aca44c674d30e3ed940ef73bbad1228a5855':
  av_memcpy_backptr: avoid an infinite loop for back = 0
  4xm: check the return value of read_huffman_tables().

Conflicts:
libavcodec/4xm.c
libavutil/mem.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/4xm.c
libavutil/mem.c

@@@ -756,12 -720,12 +756,14 @@@ static int decode_i_frame(FourXContext 
          return AVERROR_INVALIDDATA;
      }
  
 -    prestream = read_huffman_tables(f, prestream);
 +    prestream = read_huffman_tables(f, prestream, buf + length - prestream);
-     if (!prestream)
-         return -1;
+     if (!prestream) {
+         av_log(f->avctx, AV_LOG_ERROR, "Error reading Huffman tables.\n");
+         return AVERROR_INVALIDDATA;
+     }
  
 +    av_assert0(prestream <= buf + length);
 +
      init_get_bits(&f->gb, buf + 4, 8 * bitstream_size);
  
      prestream_size = length + buf - prestream;
diff --cc libavutil/mem.c
Simple merge