Skip to content

Commit 4c37281

Browse files
author
chenwei
committed
Nginx: fixbug, stack-buffer-overflow, refer to F-Stack#286.
1 parent 483c5cf commit 4c37281

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/nginx-1.11.10/src/event/modules/ngx_ff_host_event_module.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,13 @@ ngx_ff_epoll_init(ngx_cycle_t *cycle, ngx_msec_t timer)
117117
ngx_free(event_list);
118118
}
119119

120-
event_list = ngx_alloc(sizeof(struct epoll_event), cycle->log);
120+
nevents = 64;
121+
122+
event_list = ngx_alloc(sizeof(struct epoll_event) * nevents, cycle->log);
121123
if (event_list == NULL) {
122124
return NGX_ERROR;
123125
}
124126

125-
nevents = 8;
126127
return NGX_OK;
127128
}
128129

0 commit comments

Comments
 (0)