mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
r3d: Add more input value validation
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st> Conflicts: libavformat/r3d.c
This commit is contained in:
committed by
Luca Barbato
parent
fbc52044f3
commit
29fa517d40
@@ -277,6 +277,10 @@ static int r3d_read_reda(AVFormatContext *s, AVPacket *pkt, Atom *atom)
|
||||
dts = avio_rb32(s->pb);
|
||||
|
||||
st->codec->sample_rate = avio_rb32(s->pb);
|
||||
if (st->codec->sample_rate <= 0) {
|
||||
av_log(s, AV_LOG_ERROR, "Bad sample rate\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
samples = avio_rb32(s->pb);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user