mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-25 20:16:53 +01:00
fix off-by-one in http code
This commit is contained in:
parent
1e8a1c8958
commit
167f114e89
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user