summaryrefslogtreecommitdiff
path: root/librpc
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2011-09-29 19:30:39 -0700
committerKai Blin <kai@samba.org>2011-11-04 15:51:59 +0100
commit7f24a2b9136dae2c1dd1feced8c92801b25b5fb3 (patch)
tree3f9b5297e649d6e122ea3792eacb8fa08964356c /librpc
parenta243473b490c7345333eba7ad3f2033dfdbafdaa (diff)
downloadsamba-7f24a2b9136dae2c1dd1feced8c92801b25b5fb3.tar.gz
samba-7f24a2b9136dae2c1dd1feced8c92801b25b5fb3.tar.bz2
samba-7f24a2b9136dae2c1dd1feced8c92801b25b5fb3.zip
nbt: Fix offset check in ndr_pull_component
Diffstat (limited to 'librpc')
-rw-r--r--librpc/ndr/ndr_nbt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/librpc/ndr/ndr_nbt.c b/librpc/ndr/ndr_nbt.c
index 02297d3fdf..f2a1ca3ba5 100644
--- a/librpc/ndr/ndr_nbt.c
+++ b/librpc/ndr/ndr_nbt.c
@@ -76,7 +76,7 @@ static enum ndr_err_code ndr_pull_component(struct ndr_pull *ndr,
return ndr_pull_error(ndr, NDR_ERR_STRING,
"BAD NBT NAME component");
}
- if (*offset + len + 2 > ndr->data_size) {
+ if (*offset + len + 1 > ndr->data_size) {
return ndr_pull_error(ndr, NDR_ERR_STRING,
"BAD NBT NAME component");
}