Sfoglia il codice sorgente

fix(icmp): fixed uninitialized value

Initialize chdr before it is potentially used in an if statement
Emmett Kapsner 1 settimana fa
parent
commit
6c23c1dfec
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  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)