Klaus Demo nginx / 8de7663
fix segfault when $date_local or $date_gmt are used outside ssi module Igor Sysoev 14 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
26472647
26482648 ctx = ngx_http_get_module_ctx(r, ngx_http_ssi_filter_module);
26492649
2650 if (ctx->timefmt.len == sizeof("%s") - 1
2651 && ctx->timefmt.data[0] == '%' && ctx->timefmt.data[1] == 's')
2650 if (ctx == NULL
2651 || (ctx->timefmt.len == sizeof("%s") - 1
2652 && ctx->timefmt.data[0] == '%' && ctx->timefmt.data[1] == 's'))
26522653 {
26532654 v->data = ngx_palloc(r->pool, NGX_TIME_T_LEN);
26542655 if (v->data == NULL) {