mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-11 09:59:50 +00:00
lavf/pcm: check size, do not produce invalid packets
Inspired by 92b8c9d89e
.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
parent
ea6da80cb4
commit
8ca8b43d71
@ -30,6 +30,8 @@ int ff_pcm_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
int ret, size;
|
||||
|
||||
size= RAW_SAMPLES*s->streams[0]->codec->block_align;
|
||||
if (size <= 0)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
ret= av_get_packet(s->pb, pkt, size);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user