aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/rtsp.c
diff options
context:
space:
mode:
authorVittorio Giovara <vittorio.giovara@gmail.com>2014-12-17 15:19:39 +0100
committerVittorio Giovara <vittorio.giovara@gmail.com>2014-12-18 23:27:14 +0100
commit76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b (patch)
tree35ea4bafd47e65c5580a7f1693a29de6dda64afe /libavformat/rtsp.c
parentb1306823d0b3ae998c8e10ad832004eb13bdd93e (diff)
downloadffmpeg-76ccf114a6c107218e2a1948afc1d0fb3ac7ba0b.tar.gz
rtsp: check ffurl_get_file_handle() return value
CC: libav-stable@libav.org Bug-Id: CID 717844
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r--libavformat/rtsp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c
index 8276286e7e..2200f6ec07 100644
--- a/libavformat/rtsp.c
+++ b/libavformat/rtsp.c
@@ -1751,6 +1751,10 @@ redirect:
rt->seq = 0;
tcp_fd = ffurl_get_file_handle(rt->rtsp_hd);
+ if (tcp_fd < 0) {
+ err = tcp_fd;
+ goto fail;
+ }
if (!getpeername(tcp_fd, (struct sockaddr*) &peer, &peer_len)) {
getnameinfo((struct sockaddr*) &peer, peer_len, host, sizeof(host),
NULL, 0, NI_NUMERICHOST);