[0.11] gst-plugins-good: udpsrc: fix valgrind warning

Sebastian Dröge slomo at kemper.freedesktop.org
Tue Jan 10 05:33:26 PST 2012


Module: gst-plugins-good
Branch: 0.11
Commit: 86cd5bd7f2b0fe5aa594a94536dee0bd7d715798
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-good/commit/?id=86cd5bd7f2b0fe5aa594a94536dee0bd7d715798

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Tue Dec 27 11:50:03 2011 +0000

udpsrc: fix valgrind warning

https://bugzilla.gnome.org/show_bug.cgi?id=666644

---

 gst/udp/gstudpsrc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c
index dce2c99..3377df2 100644
--- a/gst/udp/gstudpsrc.c
+++ b/gst/udp/gstudpsrc.c
@@ -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);



More information about the gstreamer-commits mailing list