mirror of
https://github.com/nginx/nginx.git
synced 2024-12-18 21:23:36 -06:00
Perl: fixed optimization in SSI command handler.
As the pointer to the first argument was tested instead of the argument itself, array of arguments was always created, even if there were no arguments. Fix is to test args[0] instead of args. Found by Coverity (CID 1356862).
This commit is contained in:
parent
5a273f2e90
commit
0438b60498
@ -410,7 +410,7 @@ ngx_http_perl_ssi(ngx_http_request_t *r, ngx_http_ssi_ctx_t *ssi_ctx,
|
||||
|
||||
args = ¶ms[NGX_HTTP_PERL_SSI_ARG];
|
||||
|
||||
if (args) {
|
||||
if (args[0]) {
|
||||
|
||||
for (i = 0; args[i]; i++) { /* void */ }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user