udpsrc: fix valgrind warning
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 27 Dec 2011 11:50:03 +0000 (11:50 +0000)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 27 Dec 2011 11:50:03 +0000 (11:50 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=666644

gst/udp/gstudpsrc.c

index dce2c99..3377df2 100644 (file)
@@ -491,7 +491,8 @@ retry:
   if (G_UNLIKELY (!readsize)) {
     /* try to read a packet (and it will be ignored),
      * in case a packet with no data arrived */
-    recvfrom (udpsrc->sock.fd, (char *)&slen, 0, 0, &sa.sa, &slen);
+    slen = sizeof (sa);
+    recvfrom (udpsrc->sock.fd, (char *) &slen, 0, 0, &sa.sa, &slen);
 
     /* clear any error, in case a poll error occurred */
     clear_error (udpsrc);