summaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorJavier Sánchez Parra <jsanchez@soleta.eu>2019-09-05 12:49:23 +0200
committerOpenGnSys Support Team <soporte-og@soleta.eu>2019-09-05 13:14:33 +0200
commitba5651bcb9bd09e791f96d0d15444eb1924da0d2 (patch)
treef5c9846d74b8c5db493630feee1b08fdedf7c1a1 /admin
parent83441d01cc26d0fc2480d5a5c71d7b7fa2764d71 (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.
Diffstat (limited to 'admin')
-rw-r--r--admin/Sources/Services/ogAdmServer/sources/ogAdmServer.cpp2
1 files changed, 1 insertions, 1 deletions
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;
}