changeset 5001:c37b9a17514d

The data pointer in ngx_open_file_t objects must be initialized. Uninitialized pointer may result in arbitrary segfaults if access_log is used without buffer and without variables in file path. Patch by Tatsuhiko Kubo (ticket #268).
author Valentin Bartenev <vbart@nginx.com>
date Tue, 08 Jan 2013 14:01:57 +0000
parents 2552afcb74d3
children 39c597272c8d
files src/core/ngx_conf_file.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -946,6 +946,7 @@ ngx_conf_open_file(ngx_cycle_t *cycle, n
     }
 
     file->flush = NULL;
+    file->data = NULL;
 
     return file;
 }