git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bd430e
)
lib: Fix CID 1273234 Untrusted value as argument
author
Volker Lendecke
<vl@samba.org>
Tue, 23 Jun 2015 08:12:15 +0000
(10:12 +0200)
committer
Jeremy Allison
<jra@samba.org>
Tue, 23 Jun 2015 20:12:08 +0000
(22:12 +0200)
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>
lib/addns/dnssock.c
patch
|
blob
|
history
diff --git
a/lib/addns/dnssock.c
b/lib/addns/dnssock.c
index df17523439731a029b96ee995e7443668525ab29..a45e3255a54e0ba9b9e09e28bcc50b944d8db97e 100644
(file)
--- 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;