mailru / graphite-nginx-module

An nginx module for collecting stats into Graphite
135 stars 34 forks source link

Fix heap-buffer-overflow during module configuration #58

Open morf opened 3 months ago

morf commented 3 months ago

Fix heap-buffer-overflow issue that occurs during the initialization of the http {} block. It is incorrect to call ngx_http_conf_get_module_main_conf() within create_loc_conf. This is because the ctx, where the main structures are allocated, is set after create_loc_conf() within ngx_http_block()