Fix off-by-one.

This commit is contained in:
Emil Mikulic 2008-11-04 08:53:22 +00:00
parent 8eec408691
commit 45912c373b

View File

@ -1772,7 +1772,7 @@ static void generate_dir_listing(struct connection *conn, const char *path)
/* If a filename is made up of entirely unsafe chars,
* the url would be three times its original length.
*/
char safe_url[MAXNAMLEN*3];
char safe_url[MAXNAMLEN*3 + 1];
urlencode_filename(list[i]->name, safe_url);