mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
check build_addr() arguments for NULL before memset
This commit is contained in:
@@ -521,6 +521,9 @@ static INLINE void build_addr(SOCKADDR_IN_T* addr, const char* peer,
|
||||
(void)useLookup;
|
||||
(void)udp;
|
||||
|
||||
if (addr == NULL || peer == NULL)
|
||||
err_sys("invalid arguments to build_addr, addr or peer is NULL");
|
||||
|
||||
memset(addr, 0, sizeof(SOCKADDR_IN_T));
|
||||
|
||||
#ifndef TEST_IPV6
|
||||
|
Reference in New Issue
Block a user