From ba5651bcb9bd09e791f96d0d15444eb1924da0d2 Mon Sep 17 00:00:00 2001 From: Javier Sánchez Parra Date: Thu, 5 Sep 2019 12:49:23 +0200 Subject: #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. --- admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp index 9e506b22..6e074f8c 100644 --- a/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp +++ b/admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp @@ -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; } -- cgit v1.2.3-18-g5258