We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7faf290 commit a6df03cCopy full SHA for a6df03c
ngx_cache_purge_module.c
@@ -1702,7 +1702,9 @@ ngx_http_cache_purge_is_partial(ngx_http_request_t *r) {
1702
key = c->keys.elts;
1703
1704
/* Only check the first key */
1705
- return key[0].data[key[0].len - 1] == '*';
+ return c->keys.nelts > 0 // number of array elements
1706
+ && key[0].len > 0 // char length of the key
1707
+ && key[0].data[key[0].len - 1] == '*'; // is the last char an asterix char?
1708
}
1709
1710
char *
0 commit comments