diff options
author | Javier Sánchez Parra <jsanchez@soleta.eu> | 2019-09-05 12:49:23 +0200 |
---|---|---|
committer | OpenGnSys Support Team <soporte-og@soleta.eu> | 2019-09-05 13:14:33 +0200 |
commit | 64e653773e7d12f7afd9fcd7725b6a2921fe91a2 (patch) | |
tree | 1cdd485c026b1b969c98f93a69229db1a1133a49 | |
parent | 784495f5d504bf88e414e973d5aafc4dada3873b (diff) |
#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.
-rw-r--r-- | sources/ogAdmServer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |