Merge remote-tracking branch 'qatar/release/9' into release/1.1
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Sep 2013 12:27:10 +0000 (14:27 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Sep 2013 12:29:09 +0000 (14:29 +0200)
* qatar/release/9:
  mpegvideo: Avoid 32-bit wrapping of linesize multiplications
  mjpegb: Detect changing number of planes in interlaced video
  alac: Check that the channels fit at the given offset
  4xm: Check that the read track value is non-negative

Conflicts:
libavcodec/alac.c
libavcodec/mjpegdec.c

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

Simple merge
Simple merge
@@@ -135,10 -136,14 +135,12 @@@ static int parse_strk(AVFormatContext *
          av_log(s, AV_LOG_ERROR, "current_track too large\n");
          return AVERROR_INVALIDDATA;
      }
+     if (track < 0)
+         return AVERROR_INVALIDDATA;
      if (track + 1 > fourxm->track_count) {
 -        AudioTrack *tmp = av_realloc(fourxm->tracks,
 -                                     (track + 1) * sizeof(AudioTrack));
 -        if (!tmp)
 +        fourxm->tracks = av_realloc_f(fourxm->tracks, track + 1, sizeof(AudioTrack));
 +        if (!fourxm->tracks)
              return AVERROR(ENOMEM);
 -        fourxm->tracks = tmp;
          memset(&fourxm->tracks[fourxm->track_count], 0,
                 sizeof(AudioTrack) * (track + 1 - fourxm->track_count));
          fourxm->track_count = track + 1;