SpiderLabs/ModSecurity — pull request #718 by defanator (2014-05-12 13:15:37+00:00)
Title: Fixed segmentation fault if http context is not defined.

This commit fixes segmentation fault in case when there is no http context defined in nginx configuration:

(gdb) bt
#0 0x0000000000000000 in ?? ()
#1 0x00000000004b43be in ngx_http_modsecurity_init_process (cycle=)
at /home/defan/src/modsecurity-2.8.0/nginx/modsecurity/ngx_http_modsecurity.c:943
#2 0x000000000042b9db in ngx_worker_process_init (cycle=0x14b4980, worker=) at src/os/unix/ngx_process_cycle.c:979
#3 0x000000000042bf92 in ngx_worker_process_cycle (cycle=0x14b4980, data=) at src/os/unix/ngx_process_cycle.c:744
#4 0x000000000042a721 in ngx_spawn_process (cycle=0x14b4980, proc=0x42bf6a , data=0x0, name=0x4ff403 "worker process", respawn=0)
at src/os/unix/ngx_process.c:198
#5 0x000000000042cae8 in ngx_reap_children (cycle=0x14b4980) at src/os/unix/ngx_process_cycle.c:628
#6 ngx_master_process_cycle (cycle=0x14b4980) at src/os/unix/ngx_process_cycle.c:181
#7 0x000000000040d02b in main (argc=, argv=) at src/core/nginx.c:407
(gdb)