From 3370289a4c159ae6734ca1d85d2ded7d93e0eaf4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20Storsj=C3=B6?= Date: Sun, 4 Apr 2010 21:59:06 +0000 Subject: [PATCH] Zero-initialize the reply struct The status_code field is read in the fail codepath, where it could be read uninitialized earlier. Found by clang. Originally committed as revision 22801 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 18538c78c..643e4d5a1 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -1442,7 +1442,7 @@ int ff_rtsp_connect(AVFormatContext *s) char *option_list, *option, *filename; URLContext *rtsp_hd; int port, err, tcp_fd; - RTSPMessageHeader reply1, *reply = &reply1; + RTSPMessageHeader reply1 = {}, *reply = &reply1; int lower_transport_mask = 0; char real_challenge[64]; struct sockaddr_storage peer; -- 2.11.0