diff --git a/ChangeLog b/ChangeLog index e647471c4c..b145007149 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-05-25 Wim Taymans + + * libs/gst/net/gstnetclientclock.c: (gst_net_client_clock_start): + Initialize variable before using. Fixes #342820. + 2006-05-24 Tim-Philipp Müller * libs/gst/base/gsttypefindhelper.c: (buf_helper_find_peek): diff --git a/libs/gst/net/gstnetclientclock.c b/libs/gst/net/gstnetclientclock.c index f7a16c4e0b..d0c3889865 100644 --- a/libs/gst/net/gstnetclientclock.c +++ b/libs/gst/net/gstnetclientclock.c @@ -450,12 +450,13 @@ gst_net_client_clock_start (GstNetClientClock * self) if (ret < 0) goto getsockname_error; - GST_DEBUG_OBJECT (self, "socket opened on UDP port %hd", - ntohs (servaddr.sin_port)); - memset (&servaddr, 0, sizeof (servaddr)); servaddr.sin_family = AF_INET; /* host byte order */ servaddr.sin_port = htons (self->port); /* short, network byte order */ + + GST_DEBUG_OBJECT (self, "socket opened on UDP port %hd", + ntohs (servaddr.sin_port)); + if (!inet_aton (self->address, &servaddr.sin_addr)) goto bad_address;