Browse Source

Check for out of bound writes in the avs demuxer.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Laurent Aimar Michael Niedermayer 13 years ago
parent
commit
5d44c061cf
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavformat/avs.c

+ 2
- 0
libavformat/avs.c View File

@@ -169,6 +169,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)

switch (type) {
case AVS_PALETTE:
if (size - 4 > sizeof(palette))
return AVERROR_INVALIDDATA;
ret = avio_read(s->pb, palette, size - 4);
if (ret < size - 4)
return AVERROR(EIO);


Loading…
Cancel
Save