Skip to content

Commit 71945a5

Browse files
lib/chkhash.c: is_valid_hash(): Update minimum hash lenght
49 corresponds to the minimum SHA256 hash length. Signed-off-by: Alejandro Colomar <alx@kernel.org>
1 parent 152e56b commit 71945a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/chkhash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ bool
3838
is_valid_hash(const char *hash)
3939
{
4040
// Minimum hash length
41-
if (strlen(hash) < 13)
41+
if (strlen(hash) < 49)
4242
return false;
4343

4444
// Yescrypt: $y$ + algorithm parameters + $ + salt + $ + 43-char (minimum) hash

0 commit comments

Comments
 (0)