From: tb Date: Thu, 3 Oct 2024 04:17:05 +0000 (+0000) Subject: Switch field_bits to be an int X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=50e7bedc41d4afa51cfabaf7497797672f7832ad;p=openbsd Switch field_bits to be an int ok jsing --- diff --git a/lib/libcrypto/ec/ec_asn1.c b/lib/libcrypto/ec/ec_asn1.c index 504948b237a..634fb5254c4 100644 --- a/lib/libcrypto/ec/ec_asn1.c +++ b/lib/libcrypto/ec/ec_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ec_asn1.c,v 1.54 2024/10/03 04:15:52 tb Exp $ */ +/* $OpenBSD: ec_asn1.c,v 1.55 2024/10/03 04:17:05 tb Exp $ */ /* * Written by Nils Larsch for the OpenSSL project. */ @@ -843,7 +843,7 @@ ec_asn1_parameters2group(const ECPARAMETERS *params) EC_GROUP *ret = NULL; BIGNUM *p = NULL, *a = NULL, *b = NULL; EC_POINT *point = NULL; - long field_bits; + int field_bits; if (!params->fieldID || !params->fieldID->fieldType || !params->fieldID->p.ptr) { @@ -941,7 +941,7 @@ ec_asn1_parameters2group(const ECPARAMETERS *params) ECerror(EC_R_INVALID_GROUP_ORDER); goto err; } - if (BN_num_bits(a) > (int) field_bits + 1) { /* Hasse bound */ + if (BN_num_bits(a) > field_bits + 1) { /* Hasse bound */ ECerror(EC_R_INVALID_GROUP_ORDER); goto err; }