mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-05 06:40:03 +00:00
Merge remote-tracking branch 'qatar/master'
* qatar/master: smacker: check frame size validity Conflicts: libavformat/smacker.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
95275551ef
@ -306,12 +306,14 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
|||||||
/* if audio chunks are present, put them to stack and retrieve later */
|
/* if audio chunks are present, put them to stack and retrieve later */
|
||||||
for(i = 0; i < 7; i++) {
|
for(i = 0; i < 7; i++) {
|
||||||
if(flags & 1) {
|
if(flags & 1) {
|
||||||
unsigned int size;
|
uint32_t size;
|
||||||
uint8_t *tmpbuf;
|
uint8_t *tmpbuf;
|
||||||
|
|
||||||
size = avio_rl32(s->pb) - 4;
|
size = avio_rl32(s->pb) - 4;
|
||||||
if(size + 4L > frame_size)
|
if (!size || size + 4L > frame_size) {
|
||||||
|
av_log(s, AV_LOG_ERROR, "Invalid audio part size\n");
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
}
|
||||||
frame_size -= size;
|
frame_size -= size;
|
||||||
frame_size -= 4;
|
frame_size -= 4;
|
||||||
smk->curstream++;
|
smk->curstream++;
|
||||||
|
Loading…
Reference in New Issue
Block a user