mirror of
https://github.com/emikulic/darkhttpd.git
synced 2023-08-10 21:13:08 +03:00
. Use reasm instead of checking for a NULL reassembly element (safer)
This commit is contained in:
parent
ce5eaa9f94
commit
72d0b5b301
@ -254,13 +254,13 @@ static char *make_safe_uri(const char *uri)
|
||||
out = (char*) xmalloc(urilen+1);
|
||||
out[0] = '\0';
|
||||
|
||||
for (i=0; reassembly[i] != NULL; i++)
|
||||
for (i=0; i<reasm; i++)
|
||||
{
|
||||
strcat(out, "/");
|
||||
strcat(out, reassembly[i]);
|
||||
}
|
||||
|
||||
out = (char*) xrealloc(out, strlen(out)+1);
|
||||
out = (char*) xrealloc(out, strlen(out)+1); /* shorten buffer */
|
||||
debugf("`%s' -safe-> `%s'\n", uri, out);
|
||||
return out;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user