Fix off by one error in http downloader

This commit is contained in:
Wolfy 2020-04-12 21:14:33 -05:00
parent bceeaf78bc
commit c68e1c53f3
1 changed files with 1 additions and 1 deletions

View File

@ -1475,7 +1475,7 @@ static void SV_SendServerInfo(INT32 node, tic_t servertime)
if (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
strncpy(netbuffer->u.serverinfo.httpsource, "", mirror_length);