From 64e653773e7d12f7afd9fcd7725b6a2921fe91a2 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. --- sources/ogAdmServer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sources/ogAdmServer.cpp') diff --git a/sources/ogAdmServer.cpp b/sources/ogAdmServer.cpp index 9e506b2..6e074f8 100644 --- a/sources/ogAdmServer.cpp +++ b/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