[FFmpeg-cvslog] avformat/rtsp: check return value of ffurl_read_complete

Limin Wang git at videolan.org
Wed Nov 11 12:41:19 EET 2020


ffmpeg | branch: master | Limin Wang <lance.lmwang at gmail.com> | Wed Nov  4 20:44:43 2020 +0800| [aa1fab6934baf3528a5a344511e6bb3a19f6ff6f] | committer: Limin Wang

avformat/rtsp: check return value of ffurl_read_complete

Signed-off-by: Limin Wang <lance.lmwang at gmail.com>

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

 libavformat/rtsp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 9c693f1115..5ef2f23dc2 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1220,7 +1220,8 @@ start:
         content = av_malloc(content_length + 1);
         if (!content)
             return AVERROR(ENOMEM);
-        ffurl_read_complete(rt->rtsp_hd, content, content_length);
+        if (ffurl_read_complete(rt->rtsp_hd, content, content_length) != content_length)
+            return AVERROR(EIO);
         content[content_length] = '\0';
     }
     if (content_ptr)



More information about the ffmpeg-cvslog mailing list