Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of lwip by
Diff: core/netif.c
- Revision:
- 14:6f5eba4163ea
- Parent:
- 0:51ac1d130fd4
--- a/core/netif.c Sat Sep 28 15:58:36 2013 +0000 +++ b/core/netif.c Sat Sep 28 16:11:28 2013 +0000 @@ -318,6 +318,12 @@ void netif_set_ipaddr(struct netif *netif, ip_addr_t *ipaddr) { + /* Protect against dereferencing NULL pointers by + treating like ANY, as does ip_addr_set() */ + if (!ipaddr) { + ipaddr = IP_ADDR_ANY; + } + /* TODO: Handling of obsolete pcbs */ /* See: http://mail.gnu.org/archive/html/lwip-users/2003-03/msg00118.html */ #if LWIP_TCP