mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
Zero slashes should be impossible here.
This commit is contained in:
parent
f24c9d0d59
commit
4bf0ef5896
@ -525,6 +525,7 @@ static char *make_safe_url(char *url) {
|
|||||||
num_slashes++;
|
num_slashes++;
|
||||||
|
|
||||||
/* make an array for the URL elements */
|
/* make an array for the URL elements */
|
||||||
|
assert(num_slashes > 0);
|
||||||
chunks = xmalloc(sizeof(*chunks) * num_slashes);
|
chunks = xmalloc(sizeof(*chunks) * num_slashes);
|
||||||
|
|
||||||
/* split by slashes and build chunks array */
|
/* split by slashes and build chunks array */
|
||||||
|
Loading…
Reference in New Issue
Block a user