This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 1512f9c6e netlib/ping: fix the stack variable not initialized.
1512f9c6e is described below

commit 1512f9c6e55efc4c43d2ddb1f02445304fbdee9b
Author: buxiasen <[email protected]>
AuthorDate: Thu Jul 10 17:10:55 2025 +0800

    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 <[email protected]>
---
 netutils/netlib/netlib_checkipconnectivity.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/netutils/netlib/netlib_checkipconnectivity.c 
b/netutils/netlib/netlib_checkipconnectivity.c
index 145c987ff..44a5c636a 100644
--- a/netutils/netlib/netlib_checkipconnectivity.c
+++ b/netutils/netlib/netlib_checkipconnectivity.c
@@ -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 */
 

Reply via email to