Просмотр исходного кода

fix(icmp): fixed uninitialized value

Initialize chdr before it is potentially used in an if statement
Emmett Kapsner 1 неделя назад
Родитель
Сommit
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];
   char ans_data[4096];
   struct msghdr hdr;
   struct msghdr hdr;
   struct iovec iov;
   struct iovec iov;
-  struct cmsghdr *chdr;
+  struct cmsghdr *chdr = NULL;
 
 
   if (!*timo) {
   if (!*timo) {
     if (debug)
     if (debug)