# HG changeset patch
# User Thibault Charbonnier <thibault...@me.com>
# Date 1592445047 25200
#      Wed Jun 17 18:50:47 2020 -0700
# Node ID 3b1e0c7867c40fc82455b5c5dbf1d2e1521c1c8b
# Parent  8cf31489b479b689b7ff4a9601ce24c914d0394c
Fixed use-of-uninitialized-value inside ngx_epoll_test_rdhup.

An issue detected by Valgrind.

diff -r 8cf31489b479 -r 3b1e0c7867c4 src/event/modules/ngx_epoll_module.c
--- a/src/event/modules/ngx_epoll_module.c      Mon Jun 15 17:35:26 2020 -0400
+++ b/src/event/modules/ngx_epoll_module.c      Wed Jun 17 18:50:47 2020 -0700
@@ -473,6 +473,8 @@
         return;
     }
 
+    ngx_memzero(&ee, sizeof(struct epoll_event));
+
     ee.events = EPOLLET|EPOLLIN|EPOLLRDHUP;
 
     if (epoll_ctl(ep, EPOLL_CTL_ADD, s[0], &ee) == -1) {
# HG changeset patch
# User Thibault Charbonnier <thibault...@me.com>
# Date 1592445047 25200
#      Wed Jun 17 18:50:47 2020 -0700
# Node ID 3b1e0c7867c40fc82455b5c5dbf1d2e1521c1c8b
# Parent  8cf31489b479b689b7ff4a9601ce24c914d0394c
Fixed use-of-uninitialized-value inside ngx_epoll_test_rdhup.

An issue detected by Valgrind.

diff -r 8cf31489b479 -r 3b1e0c7867c4 src/event/modules/ngx_epoll_module.c
--- a/src/event/modules/ngx_epoll_module.c	Mon Jun 15 17:35:26 2020 -0400
+++ b/src/event/modules/ngx_epoll_module.c	Wed Jun 17 18:50:47 2020 -0700
@@ -473,6 +473,8 @@
         return;
     }
 
+    ngx_memzero(&ee, sizeof(struct epoll_event));
+
     ee.events = EPOLLET|EPOLLIN|EPOLLRDHUP;
 
     if (epoll_ctl(ep, EPOLL_CTL_ADD, s[0], &ee) == -1) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel

Reply via email to