Skip to content

Commit e50e43e

Browse files
committed
Amend atop of aafc503
1 parent ce1d438 commit e50e43e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ngx_http_modsecurity_rewrite.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,10 @@ ngx_http_modsecurity_rewrite_handler(ngx_http_request_t *r)
146146
if (n_uri == (char*)-1 || n_method == (char*)-1) {
147147
return NGX_HTTP_INTERNAL_SERVER_ERROR;
148148
}
149+
if (n_uri == NULL) {
150+
dd("uri is of length zero");
151+
return NGX_HTTP_INTERNAL_SERVER_ERROR;
152+
}
149153
old_pool = ngx_http_modsecurity_pcre_malloc_init(r->pool);
150154
msc_process_uri(ctx->modsec_transaction, n_uri, n_method, http_version);
151155
ngx_http_modsecurity_pcre_malloc_done(old_pool);

0 commit comments

Comments
 (0)