# HG changeset patch # User mstorsjo # Date 1270418346 0 # Node ID 2dbc910a7002152d0f98697b83f1cc1e07e4be52 # Parent 310b3b1b2921b6f9f4a358a165a72cb3594a8be1 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. diff -r 310b3b1b2921 -r 2dbc910a7002 rtsp.c --- a/rtsp.c Sun Apr 04 14:21:29 2010 +0000 +++ b/rtsp.c Sun Apr 04 21:59:06 2010 +0000 @@ -1442,7 +1442,7 @@ 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;