avformat/nutdec: Return error on EOF from get_str()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 20 May 2015 15:13:15 +0000 (17:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 10 Jun 2015 00:13:12 +0000 (02:13 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6bbb2f8f4da67af374d62403742482cc5962aa21)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/nutdec.c

index b1bbcb9..52dbc99 100644 (file)
@@ -49,6 +49,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