Mercurial > mplayer.hg
changeset 28697:5b749a93fc89
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]
author | reimar |
---|---|
date | Wed, 25 Feb 2009 12:51:20 +0000 |
parents | fdc03572004c |
children | c7a1f29c98c2 |
files | libvo/vo_bl.c stream/librtsp/rtsp_rtp.c stream/udp.c |
diffstat | 3 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- 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);