Просмотр исходного кода

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 лет назад
Родитель
Сommit
43573498ba
1 измененных файлов: 3 добавлений и 0 удалений
  1. 3
    0
      ngx_http_uploadprogress_module.c

+ 3
- 0
ngx_http_uploadprogress_module.c Просмотреть файл

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

Загрузка…
Отмена
Сохранить