]> git.kaiwu.me - nginx.git/commitdiff
fix segfault introduced in r2845
authorIgor Sysoev <igor@sysoev.ru>
Fri, 22 May 2009 11:32:17 +0000 (11:32 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Fri, 22 May 2009 11:32:17 +0000 (11:32 +0000)
src/http/ngx_http_variables.c

index 28c82ef2f704bd3ba2b6587315572a5894c7c0ef..d41b996c63e53778c98554087ad78f51bdcb4555 100644 (file)
@@ -1492,7 +1492,10 @@ ngx_http_variable_request_body(ngx_http_request_t *r,
     ngx_buf_t    *buf, *next;
     ngx_chain_t  *cl;
 
-    if (r->request_body == NULL || r->request_body->temp_file) {
+    if (r->request_body == NULL
+        || r->request_body->bufs == NULL
+        || r->request_body->temp_file)
+    {
         v->not_found = 1;
 
         return NGX_OK;