summaryrefslogtreecommitdiff
path: root/librpc/ndr
diff options
context:
space:
mode:
authorKai Blin <kai@samba.org>2011-09-29 19:31:07 -0700
committerKai Blin <kai@samba.org>2011-11-04 17:25:16 +0100
commit468fcfd8be4a246d9860272a286eb0fe7555a819 (patch)
tree2ecb3f7ccc5004173eeebddf7daff747348b6e34 /librpc/ndr
parent7f24a2b9136dae2c1dd1feced8c92801b25b5fb3 (diff)
downloadsamba-468fcfd8be4a246d9860272a286eb0fe7555a819.tar.gz
samba-468fcfd8be4a246d9860272a286eb0fe7555a819.tar.bz2
samba-468fcfd8be4a246d9860272a286eb0fe7555a819.zip
dns: Fix offset check in ndr_pull_component
Autobuild-User: Kai Blin <kai@samba.org> Autobuild-Date: Fri Nov 4 17:25:16 CET 2011 on sn-devel-104
Diffstat (limited to 'librpc/ndr')
-rw-r--r--librpc/ndr/ndr_dns.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/librpc/ndr/ndr_dns.c b/librpc/ndr/ndr_dns.c
index 1004db0042..27d8493777 100644
--- a/librpc/ndr/ndr_dns.c
+++ b/librpc/ndr/ndr_dns.c
@@ -88,7 +88,7 @@ static enum ndr_err_code ndr_pull_component(struct ndr_pull *ndr,
"reserved lenght field: 0x%02x",
(len &0xC));
}
- if (*offset + len + 2 > ndr->data_size) {
+ if (*offset + len + 1 > ndr->data_size) {
return ndr_pull_error(ndr, NDR_ERR_STRING,
"BAD DNS NAME component, "\
"length too long");