Check for invalid packet size in the smacker demuxer.
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit e055932f56
)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:

committed by
Anton Khirnov

parent
1486e99b90
commit
2ac3aa129e
@@ -304,6 +304,8 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
}
|
}
|
||||||
flags >>= 1;
|
flags >>= 1;
|
||||||
}
|
}
|
||||||
|
if (frame_size < 0)
|
||||||
|
return AVERROR_INVALIDDATA;
|
||||||
if (av_new_packet(pkt, frame_size + 768))
|
if (av_new_packet(pkt, frame_size + 768))
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
if(smk->frm_size[smk->cur_frame] & 1)
|
if(smk->frm_size[smk->cur_frame] & 1)
|
||||||
|
Reference in New Issue
Block a user