[FFmpeg-cvslog] rtspdec:read_line: fix use of uninitialized byte

Michael Niedermayer git at videolan.org
Fri Oct 12 00:26:42 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 11 23:57:08 2012 +0200| [0c6b9b9fe5edb7b4307e1705bac7f1087262a6fb] | committer: Michael Niedermayer

rtspdec:read_line: fix use of uninitialized byte

Fixes CID732301
Fixes CID723300
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c6b9b9fe5edb7b4307e1705bac7f1087262a6fb
---

 libavformat/rtspdec.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtspdec.c b/libavformat/rtspdec.c
index d3f4653..16ef274 100644
--- a/libavformat/rtspdec.c
+++ b/libavformat/rtspdec.c
@@ -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') {



More information about the ffmpeg-cvslog mailing list