summaryrefslogtreecommitdiff
path: root/lib/addns
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2015-06-23 10:12:15 +0200
committerJeremy Allison <jra@samba.org>2015-06-23 22:12:08 +0200
commit1f99ba7749a766f733f381db2925076290836be2 (patch)
tree5e9116b95fe0b65c206492c4ad7024174fe8230b /lib/addns
parent4bd430e05d4cef412a799cfbb60cc8339f2096c5 (diff)
downloadsamba-1f99ba7749a766f733f381db2925076290836be2.tar.gz
lib: Fix CID 1273234 Untrusted value as argument
buf->size has been sanitized in the checks done in talloc_array(). This makes the "trust" flow more explicit. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'lib/addns')
-rw-r--r--lib/addns/dnssock.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/addns/dnssock.c b/lib/addns/dnssock.c
index df175234397..a45e3255a54 100644
--- a/lib/addns/dnssock.c
+++ b/lib/addns/dnssock.c
@@ -331,7 +331,7 @@ static DNS_ERROR dns_receive_tcp(TALLOC_CTX *mem_ctx,
return ERROR_DNS_NO_MEMORY;
}
- err = read_all(conn->s, buf->data, buf->size);
+ err = read_all(conn->s, buf->data, talloc_get_size(buf->data));
if (!ERR_DNS_IS_OK(err)) {
TALLOC_FREE(buf);
return err;