[MPlayer-cvslog] r28732 - in trunk: libvo/vo_bl.c stream/librtsp/rtsp_rtp.c stream/udp.c
reimar
subversion at mplayerhq.hu
Wed Feb 25 13:51:21 CET 2009
Author: reimar
Date: Wed Feb 25 13:51:20 2009
New Revision: 28732
Log:
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]
Modified:
trunk/libvo/vo_bl.c
trunk/stream/librtsp/rtsp_rtp.c
trunk/stream/udp.c
Modified: trunk/libvo/vo_bl.c
==============================================================================
--- trunk/libvo/vo_bl.c Wed Feb 25 13:01:00 2009 (r28731)
+++ trunk/libvo/vo_bl.c Wed Feb 25 13:51:20 2009 (r28732)
@@ -177,6 +177,7 @@ static int udp_init(bl_host_t *h) {
}
h->fd = -1;
+ memset(&addr, 0, sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_port = htons(h->port);
Modified: trunk/stream/librtsp/rtsp_rtp.c
==============================================================================
--- trunk/stream/librtsp/rtsp_rtp.c Wed Feb 25 13:01:00 2009 (r28731)
+++ trunk/stream/librtsp/rtsp_rtp.c Wed Feb 25 13:51:20 2009 (r28732)
@@ -245,6 +245,7 @@ rtcp_connect (int client_port, int serve
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 @@ rtp_connect (char *hostname, int port)
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);
Modified: trunk/stream/udp.c
==============================================================================
--- trunk/stream/udp.c Wed Feb 25 13:01:00 2009 (r28731)
+++ trunk/stream/udp.c Wed Feb 25 13:51:20 2009 (r28732)
@@ -72,6 +72,7 @@ udp_open_socket (URL_t *url)
return -1;
}
+ memset(&server_address, 0, sizeof(server_address));
if (isalpha (url->hostname[0]))
{
#if !HAVE_WINSOCK2_H
More information about the MPlayer-cvslog
mailing list