mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 17:19:09 -04:00
fix(esp_netif): Prevent null deref when checking netif type
Most esp_netif public API check for invalid arguments, but when enabling PPP the macros to check netif type could potentially dereference esp_netif without any null-check. Releted to https://github.com/espressif/esp-idf/issues/14816
This commit is contained in:
parent
91baeeb61c
commit
8ee8cb11f6
@ -71,7 +71,7 @@
|
||||
* @brief macros to check netif related data to evaluate interface type
|
||||
*/
|
||||
#if CONFIG_PPP_SUPPORT
|
||||
#define _IS_NETIF_ANY_POINT2POINT_TYPE(netif) (netif->related_data && netif->related_data->is_point2point)
|
||||
#define _IS_NETIF_ANY_POINT2POINT_TYPE(netif) (netif && netif->related_data && netif->related_data->is_point2point)
|
||||
#else
|
||||
#define _IS_NETIF_ANY_POINT2POINT_TYPE(netif) false
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user