X-Git-Url: http://git.samba.org/samba.git/?p=nivanova%2Fsamba-autobuild%2F.git;a=blobdiff_plain;f=source3%2Fsmbd%2Fprocess.c;h=3cfb0812d6314b8500f2bd95e7713dfa5ad27b9c;hp=3b94d4a56d58ff4ab0ec136780d64ea0aa0b5d69;hb=5b7609db56799daf781cf81666e93a3417ad77f2;hpb=da322e4f3f0967bd65ec0f4cfbea83d9e8ccd77e diff --git a/source3/smbd/process.c b/source3/smbd/process.c index 3b94d4a56d5..3cfb0812d63 100644 --- a/source3/smbd/process.c +++ b/source3/smbd/process.c @@ -1783,7 +1783,6 @@ static bool smb_splice_chain(uint8_t **poutbuf, const uint8_t *andx_buf) uint8_t smb_command = CVAL(andx_buf, smb_com); uint8_t wct = CVAL(andx_buf, smb_wct); const uint16_t *vwv = (const uint16_t *)(andx_buf + smb_vwv); - size_t bytes_alignment = 0; uint32_t num_bytes = smb_buflen(andx_buf); const uint8_t *bytes = (const uint8_t *)smb_buf(andx_buf); @@ -1813,16 +1812,11 @@ static bool smb_splice_chain(uint8_t **poutbuf, const uint8_t *andx_buf) /* * After the old request comes the new wct field (1 byte), the vwv's - * and the num_bytes field. After at we might need to align the bytes - * given to us to "bytes_alignment", increasing the num_bytes value. + * and the num_bytes field. */ new_size = old_size + chain_padding + 1 + wct * sizeof(uint16_t) + 2; - if ((bytes_alignment != 0) && ((new_size % bytes_alignment) != 0)) { - bytes_padding = bytes_alignment - (new_size % bytes_alignment); - } - new_size += bytes_padding + num_bytes; if ((smb_command != SMBwriteX) && (new_size > 0xffff)) {