[FFmpeg-devel] [PATCH] nuv: reject negative fps rate
Andreas Cadhalpun
andreas.cadhalpun at googlemail.com
Wed Dec 16 20:56:55 CET 2015
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun at googlemail.com>
---
libavformat/nuv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/nuv.c b/libavformat/nuv.c
index 2a1b70f..4cb28d5 100644
--- a/libavformat/nuv.c
+++ b/libavformat/nuv.c
@@ -172,6 +172,10 @@ static int nuv_header(AVFormatContext *s)
if (aspect > 0.9999 && aspect < 1.0001)
aspect = 4.0 / 3.0;
fps = av_int2double(avio_rl64(pb));
+ if (fps <= 0.0f) {
+ av_log(s, AV_LOG_ERROR, "Invalid frame rate %f\n", fps);
+ return AVERROR_INVALIDDATA;
+ }
// number of packets per stream type, -1 means unknown, e.g. streaming
v_packs = avio_rl32(pb);
--
2.6.2
More information about the ffmpeg-devel
mailing list