From f19ae1417a48bf0924b3182578b7a22ecf726f97 Mon Sep 17 00:00:00 2001 From: Burkov Egor Date: Wed, 29 Jan 2025 18:21:30 +0300 Subject: [PATCH] src: add check for Bignum in GroupOrderSize I think it's missed, cause in this file we have example of checking result of BignumPointer::new Refs: https://github.com/nodejs/node/issues/56692 PR-URL: https://github.com/nodejs/node/pull/56702 Fixes: https://github.com/nodejs/node/issues/56692 Reviewed-By: James M Snell --- src/crypto/crypto_ec.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/crypto/crypto_ec.cc b/src/crypto/crypto_ec.cc index 98f1e1312769ca..10baff0d6180d5 100644 --- a/src/crypto/crypto_ec.cc +++ b/src/crypto/crypto_ec.cc @@ -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(); }