diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-06-08 18:28:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-07 23:36:31 +0200 |
commit | 498ce4e8b82e2312690613df45f87e592dcb91a9 (patch) | |
tree | aac181e44f7e4fee395c84ecafab344ac1c4cbe3 | |
parent | 9bb38ba2b782cdb6052ddcb415ef1554b0462401 (diff) | |
download | ffmpeg-498ce4e8b82e2312690613df45f87e592dcb91a9.tar.gz |
avformat/rtsp: initialize reply1
It seems reply1 is initialized by ff_rtsp_send_cmd() in most cases but there
are code paths like "continue" which look like they could skip it but even if not
writing this so a complex loop after several layers of calls initialized a local
variable through a pointer is just bad design.
This patch simply initialized the variable.
Fixes: CID1473532 Uninitialized scalar variable
Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/rtsp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 28c858077a..c6fca89d83 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1462,6 +1462,8 @@ int ff_rtsp_make_setup_request(AVFormatContext *s, const char *host, int port, char cmd[MAX_URL_SIZE]; const char *trans_pref; + memset(&reply1, 0, sizeof(reply1)); + if (rt->transport == RTSP_TRANSPORT_RDT) trans_pref = "x-pn-tng"; else if (rt->transport == RTSP_TRANSPORT_RAW) |