summaryrefslogtreecommitdiff
path: root/libcli/nbt
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2010-01-28 18:58:23 +0100
committerStefan Metzmacher <metze@samba.org>2010-01-29 15:55:11 +0100
commit6442b0fcc1931c9b41dd66b3450a216f673d4fe2 (patch)
tree9d1f760750137ac63a2e81339cd8778cc4ffc867 /libcli/nbt
parentc50a17cc8d6bc23f03c3d44ceccebce06417ba21 (diff)
downloadsamba-6442b0fcc1931c9b41dd66b3450a216f673d4fe2.tar.gz
samba-6442b0fcc1931c9b41dd66b3450a216f673d4fe2.tar.bz2
samba-6442b0fcc1931c9b41dd66b3450a216f673d4fe2.zip
libcli/nbt: fix off-by-one bug in ndr_pull_wrepl_nbt_name()
The scope starts at byte 17 with index 16. metze
Diffstat (limited to 'libcli/nbt')
-rw-r--r--libcli/nbt/nbtname.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcli/nbt/nbtname.c b/libcli/nbt/nbtname.c
index 1650ff96ae..792b340618 100644
--- a/libcli/nbt/nbtname.c
+++ b/libcli/nbt/nbtname.c
@@ -558,8 +558,8 @@ _PUBLIC_ enum ndr_err_code ndr_pull_wrepl_nbt_name(struct ndr_pull *ndr, int ndr
r->name = talloc_strdup(r, (char *)namebuf);
if (!r->name) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "out of memory");
- if (namebuf_len > 18) {
- r->scope = talloc_strndup(r, (char *)(namebuf+17), namebuf_len-17);
+ if (namebuf_len > 17) {
+ r->scope = talloc_strndup(r, (char *)(namebuf+16), namebuf_len-17);
if (!r->scope) return ndr_pull_error(ndr, NDR_ERR_ALLOC, "out of memory");
} else {
r->scope = NULL;