Переглянути джерело

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;

Завантаження…
Відмінити
Зберегти