mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
Merge commit 'd8798276b65543d921adadf63cc7f5ba2d1604af'
* commit 'd8798276b65543d921adadf63cc7f5ba2d1604af': r3d: Add more input value validation Conflicts: libavformat/r3d.c See:99b1b2b1c6
See:df92ac1852
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
f657ca0d0b
@ -85,7 +85,7 @@ static int r3d_read_red1(AVFormatContext *s)
|
||||
|
||||
framerate.num = avio_rb16(s->pb);
|
||||
framerate.den = avio_rb16(s->pb);
|
||||
if (framerate.num && framerate.den) {
|
||||
if (framerate.num > 0 && framerate.den > 0) {
|
||||
#if FF_API_R_FRAME_RATE
|
||||
st->r_frame_rate =
|
||||
#endif
|
||||
@ -283,8 +283,8 @@ 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, "negative sample rate\n");
|
||||
if (st->codec->sample_rate <= 0) {
|
||||
av_log(s, AV_LOG_ERROR, "Bad sample rate\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user