summaryrefslogtreecommitdiffstats
path: root/libavformat/rtspdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-11 23:57:08 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-12 00:08:28 +0200
commit0c6b9b9fe5edb7b4307e1705bac7f1087262a6fb (patch)
treecff9e906856d07b3cf6e413ae88376513ce38077 /libavformat/rtspdec.c
parent1b5069aa41ce3c0ce21e3fbea7ef14bac403e48e (diff)
downloadffmpeg-streaming-0c6b9b9fe5edb7b4307e1705bac7f1087262a6fb.zip
ffmpeg-streaming-0c6b9b9fe5edb7b4307e1705bac7f1087262a6fb.tar.gz
rtspdec:read_line: fix use of uninitialized byte
Fixes CID732301 Fixes CID723300 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/rtspdec.c')
-rw-r--r--libavformat/rtspdec.c4
1 files 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') {
OpenPOWER on IntegriCloud