summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1999-05-12 19:34:09 +0000
committerJeremy Allison <jra@samba.org>1999-05-12 19:34:09 +0000
commitd6ec07c0cddd4bfbf356773663e9cc8a889c3d17 (patch)
tree5e9cc525715cd4936e3360565159d486e9a92f6a
parenta92403b93274f8a2210315a49c7cbafae76985e2 (diff)
downloadsamba-d6ec07c0cddd4bfbf356773663e9cc8a889c3d17.tar.gz
Ensure that when a pipe number is extracted from the incoming buffer not
using SVAL, that we mask off the lower 16 bits to ensure correct comparisons. Jeremy.
-rw-r--r--source/smbd/ipc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/smbd/ipc.c b/source/smbd/ipc.c
index 01fec74a779..3f65eba2067 100644
--- a/source/smbd/ipc.c
+++ b/source/smbd/ipc.c
@@ -3260,8 +3260,8 @@ static int api_fd_reply(connection_struct *conn,uint16 vuid,char *outbuf,
* NB. The setup array has already been transformed
* via SVAL and so is in gost byte order.
*/
- pnum = setup[1];
- subcommand = setup[0];
+ pnum = (setup[1] & 0xFFFF);
+ subcommand = (setup[0] & 0xFFFF);
if(!(p = get_rpc_pipe(pnum))) {
DEBUG(1,("api_fd_reply: INVALID PIPE HANDLE: %x\n", pnum));