Zero slashes should be impossible here.

This commit is contained in:
Emil Mikulic 2015-01-01 18:26:35 +11:00
parent f24c9d0d59
commit 4bf0ef5896

View File

@ -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 */