mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-22 08:06:51 +08:00
Added missing casts, use strlen + MEMCPY instead of strcpy (as that might overrun the buffer)
This commit is contained in:
@@ -310,7 +310,7 @@ lwip_getaddrinfo(const char *nodename, const char *servname,
|
||||
/* If this fails, please report to lwip-devel! :-) */
|
||||
LWIP_ASSERT("total_size <= NETDB_ELEM_SIZE: please report this!",
|
||||
total_size <= NETDB_ELEM_SIZE);
|
||||
ai = memp_malloc(MEMP_NETDB);
|
||||
ai = (struct addrinfo *)memp_malloc(MEMP_NETDB);
|
||||
if (ai == NULL) {
|
||||
goto memerr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user