mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-01-04 11:38:11 +00:00
netconn_gethostbyname() needs to check for name length when LWIP_MPU_COMPATIBLE==1
This commit is contained in:
parent
1fd4b851f5
commit
4335e99f2e
@ -826,6 +826,11 @@ netconn_gethostbyname(const char *name, ip_addr_t *addr)
|
||||
|
||||
LWIP_ERROR("netconn_gethostbyname: invalid name", (name != NULL), return ERR_ARG;);
|
||||
LWIP_ERROR("netconn_gethostbyname: invalid addr", (addr != NULL), return ERR_ARG;);
|
||||
#if LWIP_MPU_COMPATIBLE
|
||||
if (strlen(name >= DNS_MAX_NAME_LENGTH) {
|
||||
return ERR_ARG;
|
||||
}
|
||||
#endif
|
||||
|
||||
API_VAR_ALLOC(struct dns_api_msg, MEMP_DNS_API_MSG, msg);
|
||||
#if LWIP_MPU_COMPATIBLE
|
||||
|
Loading…
Reference in New Issue
Block a user