mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-01 20:29:00 +00:00
netlib/ping: fix the stack variable not initialized.
We add devname in ping_info_s, but not initializeed, cause data abort as value in stack possible not NULL. Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
416c315f92
commit
1512f9c6e5
1 changed files with 3 additions and 0 deletions
|
|
@ -107,6 +107,9 @@ int netlib_check_ipconnectivity(FAR const char *ip, int timeout, int retry)
|
|||
info.timeout = timeout;
|
||||
info.callback = ping_ipaddr_callback;
|
||||
info.priv = &replies;
|
||||
#ifdef CONFIG_NET_BINDTODEVICE
|
||||
info.devname = NULL;
|
||||
#endif
|
||||
|
||||
/* if ip is NULL we use default DNS server */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue