Fixed netconn_gethostbyname for LWIP_MPU_COMPATIBLE: removed invalid check on 'addr', copy 'name' since it could be located on the caller's stack

This commit is contained in:
Simon Goldschmidt
2014-02-21 09:04:39 +01:00
parent 4d69d0eda5
commit fc158ad5c0
2 changed files with 8 additions and 5 deletions

View File

@@ -140,7 +140,11 @@ struct api_msg {
(see netconn_gethostbyname). */
struct dns_api_msg {
/** Hostname to query or dotted IP address string */
#if LWIP_MPU_COMPATIBLE
char name[DNS_MAX_NAME_LENGTH];
#else /* LWIP_MPU_COMPATIBLE */
const char *name;
#endif /* LWIP_MPU_COMPATIBLE */
/** Rhe resolved address is stored here */
ip_addr_t API_MSG_M_DEF(addr);
/** This semaphore is posted when the name is resolved, the application thread