summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/trans2.c10
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);
}