From 240829d53e34ede37d85de67390e4e8288b27514 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 14 Feb 2005 11:31:48 +0000 Subject: r5396: fixed parsing of NBT type 0xc0 compressed name pointers (This used to be commit 666cc65d10012fa2a413dfa619fbc4599f752728) --- source4/libcli/nbt/nbtname.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source4/libcli') 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; } -- cgit