diff options
author | Noel Power <noel.power@suse.com> | 2015-10-28 19:53:49 +0000 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2015-11-20 09:11:19 +0100 |
commit | 6860eb791f8963c150b7b3342c3458ae222a9a19 (patch) | |
tree | cc5dc563387abb155d709b935cff8dfbaf425200 | |
parent | 9d0bbc87b7661f306f5a9420063389d5f269011f (diff) | |
download | samba-6860eb791f8963c150b7b3342c3458ae222a9a19.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>
(cherry picked from commit 17482d52160acc869af9f7a2029d5b595d33a12d)
-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 8816402a52f..8b91b5acb74 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -2986,6 +2986,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 ) { |