mirror of
https://github.com/samba-team/samba.git
synced 2025-02-02 09:47:23 +03:00
lib: Fix CID 1272913 Calling risky function
Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
This commit is contained in:
parent
ea919567e9
commit
69160e55db
@ -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];
|
||||
|
Loading…
x
Reference in New Issue
Block a user