diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2015-04-10 00:04:01 +0530 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2015-04-12 23:08:14 +0300 |
commit | 4e5443216445f3a9b8e6cb3fa4f448762e19006e (patch) | |
tree | 71ffd6623bdfbbb28beb203044c2226b7c4fe9fa /libavformat/rtsp.c | |
parent | 0b72a47f5592ecc035edd5bac57558ad9604612d (diff) | |
download | ffmpeg-4e5443216445f3a9b8e6cb3fa4f448762e19006e.tar.gz |
rtsp: Fix unchecked return value
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 3246718bf1..29064ad45e 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); } } |