mirror of https://git.ffmpeg.org/ffmpeg.git
bit: replace assert() by proper check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
fc9d6035c3
commit
21922dc5ae
|
@ -72,7 +72,8 @@ static int read_packet(AVFormatContext *s,
|
|||
|
||||
sync = get_le16(pb); // sync word
|
||||
packet_size = get_le16(pb) / 8;
|
||||
assert(packet_size < 8 * MAX_FRAME_SIZE);
|
||||
if(packet_size > MAX_FRAME_SIZE)
|
||||
return AVERROR(EIO);
|
||||
|
||||
ret = get_buffer(pb, (uint8_t*)buf, (8 * packet_size) * sizeof(uint16_t));
|
||||
if(ret<0)
|
||||
|
|
Loading…
Reference in New Issue