From aae9f52c4efa4c185f8919dcc6d8c6f25c1df9e5 Mon Sep 17 00:00:00 2001 From: Himangi Saraogi Date: Fri, 10 Apr 2015 00:04:01 +0530 Subject: avformat/rtsp: Fix unchecked return value Reviewed-by: Thomas Volkert Signed-off-by: Michael Niedermayer --- libavformat/rtsp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libavformat/rtsp.c') diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index c9871ce120..42dbe96313 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -174,11 +174,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); } } -- cgit v1.2.3