mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Check for corrupted data in avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
834b3760a7
commit
1cce7def0a
@ -163,6 +163,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
|
|||||||
sub_type = avio_r8(s->pb);
|
sub_type = avio_r8(s->pb);
|
||||||
type = avio_r8(s->pb);
|
type = avio_r8(s->pb);
|
||||||
size = avio_rl16(s->pb);
|
size = avio_rl16(s->pb);
|
||||||
|
if (size < 4)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
avs->remaining_frame_size -= size;
|
avs->remaining_frame_size -= size;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
Loading…
Reference in New Issue
Block a user