diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-11-16 06:36:08 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:46:19 -0500 |
commit | b16543648e3cee12d6daf6d2d01c57fe1d13d6eb (patch) | |
tree | 19de592ce42a984e0f1d63c491c3c600a326abe5 /source4/include | |
parent | baa3cba4c461fe62abe7bb65dc3fdbdc5007ef5f (diff) | |
download | samba-b16543648e3cee12d6daf6d2d01c57fe1d13d6eb.tar.gz samba-b16543648e3cee12d6daf6d2d01c57fe1d13d6eb.tar.bz2 samba-b16543648e3cee12d6daf6d2d01c57fe1d13d6eb.zip |
r11737: use _smb_setlen2() to allow for 24 bit lengths in SMB2 packets
(This used to be commit 54fda24379ca1a20d6de2edf64dd79b3fe80a37d)
Diffstat (limited to 'source4/include')
-rw-r--r-- | source4/include/smb_macros.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source4/include/smb_macros.h b/source4/include/smb_macros.h index f1c62ab024..afe31e00ba 100644 --- a/source4/include/smb_macros.h +++ b/source4/include/smb_macros.h @@ -47,6 +47,8 @@ #define smb_len(buf) (PVAL(buf,3)|(PVAL(buf,2)<<8)|(PVAL(buf,1)<<16)) #define _smb_setlen(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0x10000)>>16; \ (buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0) +#define _smb_setlen2(buf,len) do {(buf)[0] = 0; (buf)[1] = ((len)&0xFF0000)>>16; \ + (buf)[2] = ((len)&0xFF00)>>8; (buf)[3] = (len)&0xFF;} while (0) #ifndef MIN #define MIN(a,b) ((a)<(b)?(a):(b)) |