# HG changeset patch # User reimar # Date 1235566280 0 # Node ID 5b749a93fc89f768297f9f2f9088f796e09b3205 # Parent fdc03572004c2648ae5f6d307acbe96f7049d578 Use memset to make sure all parts of struct sockaddr_in are always initialized. Problem reported by [kmkaplan+mplayer-dev-eng (at) kim kim-minh com] diff -r fdc03572004c -r 5b749a93fc89 libvo/vo_bl.c --- a/libvo/vo_bl.c Wed Feb 25 12:01:00 2009 +0000 +++ b/libvo/vo_bl.c Wed Feb 25 12:51:20 2009 +0000 @@ -177,6 +177,7 @@ } h->fd = -1; + memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(h->port); diff -r fdc03572004c -r 5b749a93fc89 stream/librtsp/rtsp_rtp.c --- a/stream/librtsp/rtsp_rtp.c Wed Feb 25 12:01:00 2009 +0000 +++ b/stream/librtsp/rtsp_rtp.c Wed Feb 25 12:51:20 2009 +0000 @@ -245,6 +245,7 @@ return -1; } + memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; sin.sin_addr.s_addr = INADDR_ANY; sin.sin_port = htons (client_port); @@ -293,6 +294,7 @@ if (s == -1) return -1; + memset(&sin, 0, sizeof(sin)); sin.sin_family = AF_INET; if (!hostname || !strcmp (hostname, "0.0.0.0")) sin.sin_addr.s_addr = htonl (INADDR_ANY); diff -r fdc03572004c -r 5b749a93fc89 stream/udp.c --- a/stream/udp.c Wed Feb 25 12:01:00 2009 +0000 +++ b/stream/udp.c Wed Feb 25 12:51:20 2009 +0000 @@ -72,6 +72,7 @@ return -1; } + memset(&server_address, 0, sizeof(server_address)); if (isalpha (url->hostname[0])) { #if !HAVE_WINSOCK2_H