Fixed use-of-uninitialized-value inside ngx_epoll_test_rdhup.

Thibault Charbonnier thibaultcha at fastmail.com
Thu Jun 18 01:55:36 UTC 2020


# HG changeset patch
# User Thibault Charbonnier <thibaultcha at 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) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nginx.patch
Type: text/x-patch
Size: 755 bytes
Desc: not available
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20200617/917f00cf/attachment-0001.bin>


More information about the nginx-devel mailing list