diff options
| author | Ruslan Ermilov <ru@nginx.com> | 2013-12-03 15:11:24 +0400 |
|---|---|---|
| committer | Ruslan Ermilov <ru@nginx.com> | 2013-12-03 15:11:24 +0400 |
| commit | 04199332832568384202111ae0e75d90b69b0d01 (patch) | |
| tree | 188944f6d6682bad93cc0592134eec6b411f09d1 | |
| parent | bfda85b6e48a8936b288e5f95834b00fb2bc510c (diff) | |
| download | nginx-04199332832568384202111ae0e75d90b69b0d01.tar.gz nginx-04199332832568384202111ae0e75d90b69b0d01.tar.bz2 | |
Fixed null pointer dereference with $upstream_cache_last_modified.
| -rw-r--r-- | src/http/ngx_http_upstream.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/http/ngx_http_upstream.c b/src/http/ngx_http_upstream.c index 9570ccc7e..c148f38d0 100644 --- a/src/http/ngx_http_upstream.c +++ b/src/http/ngx_http_upstream.c @@ -4555,7 +4555,8 @@ ngx_http_upstream_cache_last_modified(ngx_http_request_t *r, { u_char *p; - if (!r->upstream->conf->cache_revalidate + if (r->upstream == NULL + || !r->upstream->conf->cache_revalidate || r->upstream->cache_status != NGX_HTTP_CACHE_EXPIRED || r->cache->last_modified == -1) { |
