Added missing casts, use strlen + MEMCPY instead of strcpy (as that might overrun the buffer)

This commit is contained in:
goldsimon
2010-03-16 15:14:14 +00:00
parent 7466474365
commit a54bb7205d
2 changed files with 6 additions and 3 deletions

View File

@@ -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;
}