Skip to content

Commit 2dd55c6

Browse files
Fix x86 Library
1 parent 4899ded commit 2dd55c6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

x86/lib/auth.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1488,12 +1488,15 @@ bool constantTimeStringCompare(const char* str1, const char* str2, size_t length
14881488
int result = 0;
14891489

14901490
for (size_t i = 0; i < length; ++i) {
1491-
result |= str1[i] ^ str2[i];
1491+
char c1 = std::tolower(static_cast<unsigned char>(str1[i]));
1492+
char c2 = std::tolower(static_cast<unsigned char>(str2[i]));
1493+
result |= c1 ^ c2;
14921494
}
14931495

14941496
return result == 0;
14951497
}
14961498

1499+
14971500
std::string getPath() {
14981501
const char* programDataPath = std::getenv("ALLUSERSPROFILE");
14991502

0 commit comments

Comments
 (0)