Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 5453:b7b8e2fa7ebd
Fixed null pointer dereference with $upstream_cache_last_modified.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Tue, 03 Dec 2013 15:11:24 +0400 |
parents | 43ccaf8e8728 |
children | 07dd5bd222ac |
comparison
equal
deleted
inserted
replaced
5452:b7bf4671bb7b | 5453:b7b8e2fa7ebd |
---|---|
4553 ngx_http_upstream_cache_last_modified(ngx_http_request_t *r, | 4553 ngx_http_upstream_cache_last_modified(ngx_http_request_t *r, |
4554 ngx_http_variable_value_t *v, uintptr_t data) | 4554 ngx_http_variable_value_t *v, uintptr_t data) |
4555 { | 4555 { |
4556 u_char *p; | 4556 u_char *p; |
4557 | 4557 |
4558 if (!r->upstream->conf->cache_revalidate | 4558 if (r->upstream == NULL |
4559 || !r->upstream->conf->cache_revalidate | |
4559 || r->upstream->cache_status != NGX_HTTP_CACHE_EXPIRED | 4560 || r->upstream->cache_status != NGX_HTTP_CACHE_EXPIRED |
4560 || r->cache->last_modified == -1) | 4561 || r->cache->last_modified == -1) |
4561 { | 4562 { |
4562 v->not_found = 1; | 4563 v->not_found = 1; |
4563 return NGX_OK; | 4564 return NGX_OK; |