summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmlal <amlal.elmahrouss@icloud.com>2024-11-02 07:50:35 +0100
committerAmlal <amlal.elmahrouss@icloud.com>2024-11-02 07:50:35 +0100
commit5d408bb47e4976b1ac0308e5591152db71685743 (patch)
tree637567e78e217d7c208658aedfeb4b86340b5c74
parentf5e656424dc41ff93c67bcc8139a76d40f525efc (diff)
IMP: minOSKrnl commit 1041
- FIX: User.cc: Add validations and declare len variable. Signed-off-by: Amlal <amlal.elmahrouss@icloud.com>
-rw-r--r--dev/ZKAKit/src/User.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/dev/ZKAKit/src/User.cc b/dev/ZKAKit/src/User.cc
index 9ac154f1..ef35d2f4 100644
--- a/dev/ZKAKit/src/User.cc
+++ b/dev/ZKAKit/src/User.cc
@@ -105,6 +105,12 @@ namespace Kernel
Bool User::Matches(const UserPublicKey password_to_fill) noexcept
{
+ if (!password_to_fill ||
+ *password_to_fill)
+ return No;
+
+ SizeT len = rt_string_len(password_to_fill);
+
Char* password = new Char[len];
MUST_PASS(password);