fix off-by-one in http code

This commit is contained in:
dborth 2010-10-07 19:55:41 +00:00
parent 1e8a1c8958
commit 167f114e89

View File

@ -255,7 +255,7 @@ static bool http_split_url(char *host, char *path, const char *url)
if (c == NULL || c[0] == 0) if (c == NULL || c[0] == 0)
return false; return false;
snprintf(host, c-p, "%s", p); snprintf(host, c-p+1, "%s", p);
strcpy(path, c); strcpy(path, c);
return true; return true;
} }