Skip to content

Commit

Permalink
src: add check for Bignum in GroupOrderSize
Browse files Browse the repository at this point in the history
I think it's missed, cause in this file we have example of checking
result of BignumPointer::new

Refs: #56692
PR-URL: #56702
Fixes: #56692
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
wooffie authored Jan 29, 2025
1 parent 7a4e9e6 commit f19ae14
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/crypto/crypto_ec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -918,6 +918,7 @@ size_t GroupOrderSize(const EVPKeyPointer& key) {
const EC_KEY* ec = key;
CHECK_NOT_NULL(ec);
auto order = BignumPointer::New();
CHECK(order);
CHECK(EC_GROUP_get_order(ECKeyPointer::GetGroup(ec), order.get(), nullptr));
return order.byteLength();
}
Expand Down

0 comments on commit f19ae14

Please sign in to comment.