r4188: Ensure we add in the upper length in the right place !
authorJeremy Allison <jra@samba.org>
Tue, 14 Dec 2004 00:33:53 +0000 (00:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 15:53:36 +0000 (10:53 -0500)
Jeremy.
(This used to be commit 9d4e57f06c4f75f42036e91401b0d0392647752b)

source3/libsmb/clireadwrite.c

index 64f16e94ca0c94e4a274d385588ef04f0a8f1acd..1785905ff2edc863ac87353a676573717c2a0878 100644 (file)
@@ -122,7 +122,7 @@ ssize_t cli_read(struct cli_state *cli, int fnum, char *buf, off_t offset, size_
                }
 
                size2 = SVAL(cli->inbuf, smb_vwv5);
-               size2 |= (SVAL(cli->inbuf, smb_vwv7) & 1);
+               size2 |= (((unsigned int)(SVAL(cli->inbuf, smb_vwv7) & 1)) << 16);
 
                if (size2 > readsize) {
                        DEBUG(5,("server returned more than we wanted!\n"));