瀏覽代碼

Fix #2 - fix crash when compiling scripts

Some uninitialized memory could lead to non array allocation in scripts,
leading to a segfault when reloading nginx.

Signed-off-by: Brice Figureau <brice@daysofwonder.com>
tags/v0.8
Brice Figureau 16 年之前
父節點
當前提交
43573498ba
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3
    0
      ngx_http_uploadprogress_module.c

+ 3
- 0
ngx_http_uploadprogress_module.c 查看文件

@@ -1475,6 +1475,9 @@ ngx_http_upload_progress_set_template(ngx_conf_t * cf, ngx_http_uploadprogress_t
1475 1475
 
1476 1476
     ngx_memzero(&sc, sizeof(ngx_http_script_compile_t));
1477 1477
 
1478
+		t->lengths = NULL;
1479
+		t->values = NULL;
1480
+
1478 1481
     sc.cf = cf;
1479 1482
     sc.source = source;
1480 1483
     sc.lengths = &t->lengths;

Loading…
取消
儲存