diff options
author | Noel Power <noel.power@suse.com> | 2015-10-28 19:53:49 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-11-05 21:12:10 +0100 |
commit | 17482d52160acc869af9f7a2029d5b595d33a12d (patch) | |
tree | bb7123f8009db7d185843766fb30997299931f78 | |
parent | 0f2f8a4f772ff22d00a9e87dafa97a431af8f6da (diff) | |
download | samba-17482d52160acc869af9f7a2029d5b595d33a12d.tar.gz |
fix writev(vector[...]) points to uninitialised bytes in call_trans2findnext
Signed-off-by: Noel Power <noel.power@suse.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
-rw-r--r-- | source3/smbd/trans2.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index 967a56c1145..e2e4c8047ae 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2990,6 +2990,11 @@ total_data=%u (should be %u)\n", (unsigned int)total_data, (unsigned int)IVAL(pd pdata = *ppdata; data_end = pdata + max_data_bytes + DIR_ENTRY_SAFETY_MARGIN - 1; + /* + * squash valgrind "writev(vector[...]) points to uninitialised byte(s)" + * error. + */ + memset(pdata + total_data, 0, (max_data_bytes + DIR_ENTRY_SAFETY_MARGIN) - total_data); /* Realloc the params space */ *pparams = (char *)SMB_REALLOC(*pparams, 6*SIZEOFWORD); if(*pparams == NULL ) { |