Merge commit 'e70c5b034c4787377e82cab2d5565486baec0c2a'
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 12 Dec 2012 08:55:56 +0000 (09:55 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 12 Dec 2012 08:55:56 +0000 (09:55 +0100)
* commit 'e70c5b034c4787377e82cab2d5565486baec0c2a':
  swfdec: do better validation of tag length
  Make LOCAL_ALIGNED syntactically similar on all systems

Conflicts:
libavformat/swfdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/dsputil.h
libavformat/swfdec.c

Simple merge
@@@ -154,9 -99,9 +154,9 @@@ static int swf_read_packet(AVFormatCont
          uint64_t pos = avio_tell(pb);
          tag = get_swf_tag(pb, &len);
          if (tag < 0)
 -            return AVERROR(EIO);
 +            return tag;
          if (len < 0) {
-             av_log(s, AV_LOG_ERROR, "len %d is invalid\n", len);
+             av_log(s, AV_LOG_ERROR, "invalid tag length: %d\n", len);
              return AVERROR_INVALIDDATA;
          }
          if (tag == TAG_VIDEOSTREAM) {
@@@ -441,10 -233,9 +452,11 @@@ bitmap_end_skip
              pkt->pos = pos;
              pkt->stream_index = st->index;
              return pkt->size;
 +        } else {
 +            av_log(s, AV_LOG_DEBUG, "Unknown tag: %d\n", tag);
          }
      skip:
+         len = FFMAX(0, len);
          avio_skip(pb, len);
      }
  }