From 6bbb2f8f4da67af374d62403742482cc5962aa21 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 20 May 2015 17:13:15 +0200 Subject: [PATCH] avformat/nutdec: Return error on EOF from get_str() Signed-off-by: Michael Niedermayer --- libavformat/nutdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 2762db2889..15a6fe30d8 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -52,6 +52,8 @@ static int get_str(AVIOContext *bc, char *string, unsigned int maxlen) if (maxlen) string[FFMIN(len, maxlen - 1)] = 0; + if (bc->eof_reached) + return AVERROR_EOF; if (maxlen == len) return -1; else