From 6b041cb617e5d5e4fc46c8be91c127c6b366bc79 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 29 May 2014 01:48:02 +0200 Subject: [PATCH] avformat/nutdec: Fix handling of older 4.0 files Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 5fd2a40f42..7da6f2c441 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -341,7 +341,7 @@ static int decode_main_header(NUTContext *nut) } // flags had been effectively introduced in version 4 - if (nut->version > NUT_STABLE_VERSION) { + if (nut->version > 3 && end > avio_tell(bc) + 4) { nut->flags = ffio_read_varlen(bc); }