1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-19 18:50:24 +03:00

nbt: Fix offset check in ndr_pull_component

This commit is contained in:
Kai Blin 2011-09-29 19:30:39 -07:00
parent a243473b49
commit 7f24a2b913

View File

@ -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");
}