<div dir="ltr"><div>*bump*<br><br>This one came up on IRC again the other day.<br></div>--Jason Ekstrand<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 9, 2013 at 4:59 PM, Jason Ekstrand <span dir="ltr"><<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Valgrind complains because sometimes padding at the ends of strings and arrays<br>
is left uninitialized.  Zeroing out the buffer fixes this problem.<br>
<br>
Signed-off-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
---<br>
 src/connection.c | 4 ++++<br>
 1 file changed, 4 insertions(+)<br>
<br>
diff --git a/src/connection.c b/src/connection.c<br>
index 9425ca6..f79b6d0 100644<br>
--- a/src/connection.c<br>
+++ b/src/connection.c<br>
@@ -1018,6 +1018,8 @@ wl_closure_send(struct wl_closure *closure, struct wl_connection *connection)<br>
        uint32_t buffer[256];<br>
        int size;<br>
<br>
+       memset(buffer, 0, sizeof buffer);<br>
+<br>
        if (copy_fds_to_connection(closure, connection))<br>
                return -1;<br>
<br>
@@ -1034,6 +1036,8 @@ wl_closure_queue(struct wl_closure *closure, struct wl_connection *connection)<br>
        uint32_t buffer[256];<br>
        int size;<br>
<br>
+       memset(buffer, 0, sizeof buffer);<br>
+<br>
        if (copy_fds_to_connection(closure, connection))<br>
                return -1;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.8.1.4<br>
<br>
</font></span></blockquote></div><br></div>