rtspdec:read_line: fix use of uninitialized byte
Fixes CID732301 Fixes CID723300 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -76,8 +76,8 @@ static inline int read_line(AVFormatContext *s, char *rbuf, const int rbufsize,
|
|||||||
|
|
||||||
do {
|
do {
|
||||||
ret = ffurl_read_complete(rt->rtsp_hd, rbuf + idx, 1);
|
ret = ffurl_read_complete(rt->rtsp_hd, rbuf + idx, 1);
|
||||||
if (ret < 0)
|
if (ret <= 0)
|
||||||
return ret;
|
return ret ? ret : AVERROR_EOF;
|
||||||
if (rbuf[idx] == '\r') {
|
if (rbuf[idx] == '\r') {
|
||||||
/* Ignore */
|
/* Ignore */
|
||||||
} else if (rbuf[idx] == '\n') {
|
} else if (rbuf[idx] == '\n') {
|
||||||
|
Reference in New Issue
Block a user