mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-29 22:00:58 +02:00
Fixed segfault on corrupted smacker streams in the demuxer.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit d0121e8d969cde74fa7dbd96d3602109b051e701)
This commit is contained in:
parent
b261ebfd22
commit
6108f04d4f
@ -284,6 +284,10 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
frame_size -= 4;
|
||||
smk->curstream++;
|
||||
smk->bufs[smk->curstream] = av_realloc(smk->bufs[smk->curstream], size);
|
||||
if (!smk->bufs[smk->curstream]) {
|
||||
smk->buf_sizes[smk->curstream] = 0;
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
smk->buf_sizes[smk->curstream] = size;
|
||||
ret = get_buffer(s->pb, smk->bufs[smk->curstream], size);
|
||||
if(ret != size)
|
||||
|
Loading…
x
Reference in New Issue
Block a user