git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea91956
)
lib: Fix CID 1272913 Calling risky function
author
Volker Lendecke
<vl@samba.org>
Tue, 23 Jun 2015 08:02:17 +0000
(10:02 +0200)
committer
Jeremy Allison
<jra@samba.org>
Tue, 23 Jun 2015 20:12:08 +0000
(22:12 +0200)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/addns/dnsrecord.c
patch
|
blob
|
history
diff --git
a/lib/addns/dnsrecord.c
b/lib/addns/dnsrecord.c
index 724d0dfd8fae75563da91d80ebd1532fb37b0277..0d14937399719f790eb6ccb8c41a3df7994dba35 100644
(file)
--- a/
lib/addns/dnsrecord.c
+++ b/
lib/addns/dnsrecord.c
@@
-22,6
+22,7
@@
*/
#include "dns.h"
+#include "lib/util/genrand.h"
DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name,
uint16_t q_type, uint16_t q_class,
@@
-39,7
+40,7
@@
DNS_ERROR dns_create_query( TALLOC_CTX *mem_ctx, const char *name,
return ERROR_DNS_NO_MEMORY;
}
-
req->id = random(
);
+
generate_random_buffer((uint8_t *)&req->id, sizeof(req->id)
);
req->num_questions = 1;
q = req->questions[0];