summaryrefslogtreecommitdiff
path: root/source4/libcli
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-02-14 11:31:48 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:51 -0500
commit240829d53e34ede37d85de67390e4e8288b27514 (patch)
tree8dd436983658bf5d6a6fa56a618fe2c0b618d828 /source4/libcli
parent8c76eb2672343007bc5de60487e01a87fd76f799 (diff)
downloadsamba-240829d53e34ede37d85de67390e4e8288b27514.tar.gz
samba-240829d53e34ede37d85de67390e4e8288b27514.tar.bz2
samba-240829d53e34ede37d85de67390e4e8288b27514.zip
r5396: fixed parsing of NBT type 0xc0 compressed name pointers
(This used to be commit 666cc65d10012fa2a413dfa619fbc4599f752728)
Diffstat (limited to 'source4/libcli')
-rw-r--r--source4/libcli/nbt/nbtname.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c
index db1e51a1a9..6713c90285 100644
--- a/source4/libcli/nbt/nbtname.c
+++ b/source4/libcli/nbt/nbtname.c
@@ -55,8 +55,9 @@ static NTSTATUS ndr_pull_component(struct ndr_pull *ndr, uint8_t **component,
if (1 + *offset >= ndr->data_size) {
return NT_STATUS_BAD_NETWORK_NAME;
}
+ *max_offset = MAX(*max_offset, *offset + 2);
*offset = ((len&0x3F)<<8) | ndr->data[1 + *offset];
- *max_offset = MAX(*max_offset, *offset + 1);
+ *max_offset = MAX(*max_offset, *offset);
loops++;
continue;
}