mirror of
https://github.com/nginx/nginx.git
synced 2024-11-21 16:28:40 +00:00
Rewrite: fixed "return" directive without response text.
Previously, the response text wasn't initialized and the rewrite module was sending response body set to NULL. Found with UndefinedBehaviorSanitizer (pointer-overflow). Signed-off-by: Piotr Sikora <piotr@aviatrix.com>
This commit is contained in:
parent
3d5a356abb
commit
2f9e8431e6
@ -489,6 +489,7 @@ ngx_http_rewrite_return(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
|
||||
}
|
||||
|
||||
if (cf->args->nelts == 2) {
|
||||
ngx_str_set(&ret->text.value, "");
|
||||
return NGX_CONF_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user