diff options
author | Volker Lendecke <vlendec@samba.org> | 2007-08-13 14:40:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:29:36 -0500 |
commit | 2a375f12be2ce2b2b8db58105b1794679bfa3920 (patch) | |
tree | 38e3f02908e642ca59198c686d82450e831d4559 /source3 | |
parent | 1d8e64aeceef5a4dd43b18491714fb6d9eb10105 (diff) | |
download | samba-2a375f12be2ce2b2b8db58105b1794679bfa3920.tar.gz samba-2a375f12be2ce2b2b8db58105b1794679bfa3920.tar.bz2 samba-2a375f12be2ce2b2b8db58105b1794679bfa3920.zip |
r24362: Initialize padding also when no params are sent back
(This used to be commit 03c5e960a21ae78cdd832a5c760015f7fbd83bd9)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/smbd/trans2.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c index f65d833ab0..9c4c8556d2 100644 --- a/source3/smbd/trans2.c +++ b/source3/smbd/trans2.c @@ -699,13 +699,15 @@ void send_trans2_replies(struct smb_request *req, SSVAL(req->outbuf,smb_drdisp, pd - pdata); } + /* Initialize the padding for alignment */ + + if (alignment_offset != 0) { + memset(smb_buf(req->outbuf), 0, alignment_offset); + } + /* Copy the param bytes into the packet */ if(params_sent_thistime) { - if (alignment_offset != 0) { - memset(smb_buf(req->outbuf), 0, - alignment_offset); - } memcpy((smb_buf(req->outbuf)+alignment_offset), pp, params_sent_thistime); } |