فهرست منبع

fix(icmp): fixed uninitialized value

Initialize chdr before it is potentially used in an if statement
Emmett Kapsner 1 هفته پیش
والد
کامیت
6c23c1dfec
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      plugins-root/check_icmp.c

+ 1 - 1
plugins-root/check_icmp.c

@@ -1274,7 +1274,7 @@ static int recvfrom_wto(int sock, void *buf, unsigned int len,
   char ans_data[4096];
   struct msghdr hdr;
   struct iovec iov;
-  struct cmsghdr *chdr;
+  struct cmsghdr *chdr = NULL;
 
   if (!*timo) {
     if (debug)