Skip to content

Commit 2004a1f

Browse files
committed
Merge branch 'secure_strequals_nullguess' into 0.2.x
2 parents 704771d + 9951492 commit 2004a1f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/datum_utils.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ int datum_atoi_strict(const char * const s, const size_t size) {
738738
}
739739

740740
bool datum_secure_strequals(const char *secret, size_t secret_len, const char *guess) {
741+
if (!guess) return false;
741742
const size_t guess_len = strlen(guess);
742743
size_t acc = secret_len ^ guess_len;
743744
if (!secret_len) {

0 commit comments

Comments
 (0)