Browse Source

Merge commit '710b0e27025948b7511821c2f888ff2d74a59e14'

* commit '710b0e27025948b7511821c2f888ff2d74a59e14':
  smacker: Avoid integer overflow when allocating packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
c16cd55593
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/smacker.c

+ 1
- 1
libavformat/smacker.c View File

@@ -331,7 +331,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
}
flags >>= 1;
}
if (frame_size < 0)
if (frame_size < 0 || frame_size >= INT_MAX/2)
return AVERROR_INVALIDDATA;
if (av_new_packet(pkt, frame_size + 769))
return AVERROR(ENOMEM);


Loading…
Cancel
Save