#915 fix missing null-terminated string

This patch changes the number of characters stored in cli->auth_token
from 64 to 63. This way the array has the last position available to
store the null character.
master
Javier Sánchez Parra 2019-09-05 12:49:23 +02:00 committed by OpenGnSys Support Team
parent 784495f5d5
commit 64e653773e
1 changed files with 1 additions and 1 deletions

View File

@ -4172,7 +4172,7 @@ static int og_client_state_recv_hdr_rest(struct og_client *cli)
ptr = strstr(cli->buf, "Authorization: ");
if (ptr)
sscanf(ptr, "Authorization: %64[^\r\n]", cli->auth_token);
sscanf(ptr, "Authorization: %63[^\r\n]", cli->auth_token);
return 1;
}