diff options
author | Volker Lendecke <vl@samba.org> | 2015-06-23 10:02:17 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2015-06-23 22:12:08 +0200 |
commit | 69160e55db06b0bf5987e3e39c9b584f19cb902f (patch) | |
tree | a8a9e77e96506f169d6d1ecf35157f4b706d3cae /lib/addns | |
parent | ea919567e95a9cdd12289fe52e746f3dea43ad8f (diff) | |
download | samba-69160e55db06b0bf5987e3e39c9b584f19cb902f.tar.gz |
lib: Fix CID 1272913 Calling risky function
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/dnsrecord.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/addns/dnsrecord.c b/lib/addns/dnsrecord.c index 724d0dfd8fa..0d149373997 100644 --- 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]; |