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 e60093f commit 340da7fCopy full SHA for 340da7f
ngx_cache_purge_module.c
@@ -1832,7 +1832,9 @@ ngx_http_cache_purge_is_partial(ngx_http_request_t *r) {
1832
key = c->keys.elts;
1833
1834
/* Only check the first key */
1835
- return key[0].data[key[0].len - 1] == '*';
+ return c->keys.nelts > 0 // number of array elements
1836
+ && key[0].len > 0 // char length of the key
1837
+ && key[0].data[key[0].len - 1] == '*'; // is the last char an asterix char?
1838
}
1839
1840
char *
0 commit comments