diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-28 00:53:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-01-31 17:29:41 +0100 |
commit | e75a73d6294807a8d4d6022280cd6e25dac32990 (patch) | |
tree | a608e73568fe31a689978e710bb52c4c102e11c6 /libavformat/rtsp.c | |
parent | b482e94e59b15efde07326619c3cdab5826d1320 (diff) | |
download | ffmpeg-e75a73d6294807a8d4d6022280cd6e25dac32990.tar.gz |
avformat/rtsp: Clear reply in every iteration in ff_rtsp_connect()
Fixes: Infinite loop
Found-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 0b50f27635f684ec0526e9975c9979f35bbf486b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index ceb770a3a4..82c6c12af5 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1663,7 +1663,7 @@ int ff_rtsp_connect(AVFormatContext *s) char tcpname[1024], cmd[2048], auth[128]; const char *lower_rtsp_proto = "tcp"; int port, err, tcp_fd; - RTSPMessageHeader reply1 = {0}, *reply = &reply1; + RTSPMessageHeader reply1, *reply = &reply1; int lower_transport_mask = 0; int default_port = RTSP_DEFAULT_PORT; char real_challenge[64] = ""; @@ -1692,6 +1692,7 @@ int ff_rtsp_connect(AVFormatContext *s) rt->lower_transport_mask &= (1 << RTSP_LOWER_TRANSPORT_NB) - 1; redirect: + memset(&reply1, 0, sizeof(reply1)); /* extract hostname and port */ av_url_split(proto, sizeof(proto), auth, sizeof(auth), host, sizeof(host), &port, path, sizeof(path), s->url); |