Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src-c/digestif.ml
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ end

module Make_BLAKE2 (F : Foreign_BLAKE2) (D : Desc) = struct
let () =
if D.digest_size > F.max_outlen ()
if D.digest_size < 1 || D.digest_size > F.max_outlen ()
then
failwith "Invalid digest_size:%d to make a BLAKE2{S,B} implementation"
D.digest_size
Expand Down
2 changes: 1 addition & 1 deletion src-ocaml/digestif.ml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ end

module Make_BLAKE2 (H : Hash_BLAKE2) (D : Desc) = struct
let () =
if D.digest_size > H.max_outlen
if D.digest_size < 1 || D.digest_size > H.max_outlen
then
failwith "Invalid digest_size:%d to make a BLAKE2{S,B} implementation"
D.digest_size
Expand Down
Loading