s4:winbind: let WBSRV_SAMBA3_SET_STRING() initialize the whole buffer
authorStefan Metzmacher <metze@samba.org>
Sat, 10 Jul 2010 07:09:28 +0000 (09:09 +0200)
committerStefan Metzmacher <metze@samba.org>
Sat, 10 Jul 2010 07:35:03 +0000 (09:35 +0200)
We should not send uninitialized bytes to the winbind pipe,
this makes also makes valgrind very unhappy.

metze

source4/winbind/wb_server.h

index 111aefc624962ce9a2ab9fc5c9778079d7d301d7..1ffb62e4859d6bd5cc4b4dd4d1cadd2902a6b747 100644 (file)
@@ -104,6 +104,7 @@ struct wbsrv_connection {
 };
 
 #define WBSRV_SAMBA3_SET_STRING(dest, src) do { \
+       memset(dest, 0, sizeof(dest));\
        safe_strcpy(dest, src, sizeof(dest)-1);\
 } while(0)