From 2a375f12be2ce2b2b8db58105b1794679bfa3920 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 13 Aug 2007 14:40:56 +0000 Subject: r24362: Initialize padding also when no params are sent back (This used to be commit 03c5e960a21ae78cdd832a5c760015f7fbd83bd9) --- source3/smbd/trans2.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/smbd') 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); } -- cgit