[FFmpeg-cvslog] rtsp: Fix unchecked return value

Himangi Saraogi git at videolan.org
Mon Apr 13 01:52:43 CEST 2015


ffmpeg | branch: master | Himangi Saraogi <himangi774 at gmail.com> | Fri Apr 10 00:22:01 2015 +0530| [4e5443216445f3a9b8e6cb3fa4f448762e19006e] | committer: Martin Storsjö

rtsp: Fix unchecked return value

Signed-off-by: Martin Storsjö <martin at martin.st>

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

 libavformat/rtsp.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 3246718..29064ad 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -169,11 +169,15 @@ static void rtsp_parse_range_npt(const char *p, int64_t *start, int64_t *end)
     *end = AV_NOPTS_VALUE;
 
     get_word_sep(buf, sizeof(buf), "-", &p);
-    av_parse_time(start, buf, 1);
+    if (av_parse_time(start, buf, 1) < 0) {
+        av_log(NULL, AV_LOG_ERROR, "Invalid interval start specification '%s'\n", buf);
+        return;
+    }
     if (*p == '-') {
         p++;
         get_word_sep(buf, sizeof(buf), "-", &p);
-        av_parse_time(end, buf, 1);
+        if (av_parse_time(end, buf, 1) < 0)
+            av_log(NULL, AV_LOG_ERROR, "Invalid interval end specification '%s'\n", buf);
     }
 }
 



More information about the ffmpeg-cvslog mailing list