Check for corrupted data in avs demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1cce7def0a
)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:

committed by
Michael Niedermayer

parent
635256a324
commit
2e1e3c1e41
@@ -163,6 +163,8 @@ static int avs_read_packet(AVFormatContext * s, AVPacket * pkt)
|
|||||||
sub_type = get_byte(s->pb);
|
sub_type = get_byte(s->pb);
|
||||||
type = get_byte(s->pb);
|
type = get_byte(s->pb);
|
||||||
size = get_le16(s->pb);
|
size = get_le16(s->pb);
|
||||||
|
if (size < 4)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
avs->remaining_frame_size -= size;
|
avs->remaining_frame_size -= size;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
Reference in New Issue
Block a user