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:
- 12:4b3f6f8b92d2
- Parent:
- 0:51ac1d130fd4
--- a/core/netif.c Thu May 30 17:11:58 2013 +0100 +++ b/core/netif.c Mon Aug 19 18:37:54 2013 +0300 @@ -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