From 5d408bb47e4976b1ac0308e5591152db71685743 Mon Sep 17 00:00:00 2001 From: Amlal Date: Sat, 2 Nov 2024 07:50:35 +0100 Subject: IMP: minOSKrnl commit 1041 - FIX: User.cc: Add validations and declare len variable. Signed-off-by: Amlal --- dev/ZKAKit/src/User.cc | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'dev') 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); -- cgit v1.2.3