From 175fea40942d91af2d79714b69e75b308da1b4c5 Mon Sep 17 00:00:00 2001 From: Jens Steube Date: Thu, 1 Nov 2018 11:54:40 +0100 Subject: [PATCH] Fixed out-of-bounds write in short-term memory of the brain-server --- docs/changes.txt | 1 + src/brain.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changes.txt b/docs/changes.txt index 09306c412..7f5e08ad2 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -29,6 +29,7 @@ - Fixed missing call to WSAStartup() and client indexing in order to start the brain server on windows - Fixed missing call to WSACleanup() to cleanly shutdown windows sockets system - Fixed endianness and invalid separator character in outfile format of hash-mode 16801 (WPA-PMKID-PMK) +- Fixed out-of-bounds write in short-term memory of the brain-server * changes v4.2.1 -> v5.0.0 diff --git a/src/brain.c b/src/brain.c index 440aa93d2..0faf6bd9f 100644 --- a/src/brain.c +++ b/src/brain.c @@ -2659,7 +2659,7 @@ void *brain_server_handle_client (void *p) break; } - if (hashes_cnt > passwords_max) + if ((brain_server_db_short->short_cnt + hashes_cnt) > passwords_max) { brain_logging (stderr, client_idx, "Too many passwords\n");