Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

fixed a segfault

  • Loading branch information...
commit 44958e0a96a5328ee6d136fa1403d872fca673ea 1 parent bb6924d
Mauro Stettler authored

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. +5 3 ngx_http_lower_upper_case.c
8 ngx_http_lower_upper_case.c
@@ -173,11 +173,13 @@ ngx_http_do_lower_upper(ngx_http_request_t *r, ngx_http_variable_value_t *dst_v,
173 173 {
174 174 ngx_http_lower_upper_case_conf_t *lucf = ngx_http_get_module_loc_conf(r, ngx_http_lower_upper_case_module);
175 175 ngx_uint_t i;
176   - u_char *tmp_void;
  176 + //u_char *tmp_void;
177 177 ngx_http_lucase_t *lucase;
178 178
179   - tmp_void = lucf->lucases->elts;
180   - lucase = (ngx_http_lucase_t*) &tmp_void[data];
  179 + //tmp_void = lucf->lucases->elts;
  180 + //lucase = (ngx_http_lucase_t*) (tmp_void + (data * lucf->lucases->size));
  181 +
  182 + lucase = (ngx_http_lucase_t*) ((u_char*)lucf->lucases->elts + (data * lucf->lucases->size));
181 183
182 184 if (ngx_http_script_run(r, lucase->src_variable, lucase->src_lengths->elts, 0, lucase->src_values->elts) == NULL) {
183 185 ngx_log_error(NGX_LOG_INFO, r->connection->log, 0, "source evaluation failed");

0 comments on commit 44958e0

Please sign in to comment.
Something went wrong with that request. Please try again.