rtspdec:read_line: fix use of uninitialized byte
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 21:57:08 +0000 (23:57 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 11 Oct 2012 22:08:28 +0000 (00:08 +0200)
Fixes CID732301
Fixes CID723300
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/rtspdec.c

index d3f4653..16ef274 100644 (file)
@@ -76,8 +76,8 @@ static inline int read_line(AVFormatContext *s, char *rbuf, const int rbufsize,
 
     do {
         ret = ffurl_read_complete(rt->rtsp_hd, rbuf + idx, 1);
-        if (ret < 0)
-            return ret;
+        if (ret <= 0)
+            return ret ? ret : AVERROR_EOF;
         if (rbuf[idx] == '\r') {
             /* Ignore */
         } else if (rbuf[idx] == '\n') {