summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt/nbtname.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libcli/nbt/nbtname.c')
-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;
}