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>
Thu, 21 May 2015 18:43:39 +0000 (20:43 +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 c4d56ce..a0a88b3 100644 (file)
@@ -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