mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2025-02-05 16:01:04 +00:00
Fix off by one error in http downloader
This commit is contained in:
parent
bceeaf78bc
commit
c68e1c53f3
1 changed files with 1 additions and 1 deletions
|
@ -1475,7 +1475,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
|
||||||
if (mirror_length > MAX_MIRROR_LENGTH)
|
if (mirror_length > MAX_MIRROR_LENGTH)
|
||||||
mirror_length = MAX_MIRROR_LENGTH;
|
mirror_length = MAX_MIRROR_LENGTH;
|
||||||
|
|
||||||
if (snprintf(netbuffer->u.serverinfo.httpsource, mirror_length, "%s", httpurl) < 0)
|
if (snprintf(netbuffer->u.serverinfo.httpsource, mirror_length+1, "%s", httpurl) < 0)
|
||||||
// If there's an encoding error, send nothing, we accept that the above may be truncated
|
// If there's an encoding error, send nothing, we accept that the above may be truncated
|
||||||
strncpy(netbuffer->u.serverinfo.httpsource, "", mirror_length);
|
strncpy(netbuffer->u.serverinfo.httpsource, "", mirror_length);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue