. Use reasm instead of checking for a NULL reassembly element (safer)

This commit is contained in:
Emil Mikulic 2003-03-08 11:33:17 +00:00
parent ce5eaa9f94
commit 72d0b5b301

View File

@ -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;
}