aboutsummaryrefslogtreecommitdiff
path: root/crypto/bn/bn_div.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2022-05-03 15:01:12 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2022-05-03 15:01:12 +0000
commitcf0ffd7607ed8f39829c6951a65a55fa1eb3aafe (patch)
tree313b32246c8ef2c8b712ea825eda45d4d09f4a18 /crypto/bn/bn_div.c
parentd6d3d400982465ee2c394caa850ba51c537b5a09 (diff)
downloadsrc-cf0ffd7607ed8f39829c6951a65a55fa1eb3aafe.tar.gz
src-cf0ffd7607ed8f39829c6951a65a55fa1eb3aafe.zip
Import OpenSSL 1.1.1ovendor/openssl/1.1.1o
Diffstat (limited to 'crypto/bn/bn_div.c')
-rw-r--r--crypto/bn/bn_div.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c
index 0da9f39b31a9..4273618825cc 100644
--- a/crypto/bn/bn_div.c
+++ b/crypto/bn/bn_div.c
@@ -1,5 +1,5 @@
/*
- * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
@@ -446,8 +446,10 @@ int bn_div_fixed_top(BIGNUM *dv, BIGNUM *rm, const BIGNUM *num,
snum->neg = num_neg;
snum->top = div_n;
snum->flags |= BN_FLG_FIXED_TOP;
- if (rm != NULL)
- bn_rshift_fixed_top(rm, snum, norm_shift);
+
+ if (rm != NULL && bn_rshift_fixed_top(rm, snum, norm_shift) == 0)
+ goto err;
+
BN_CTX_end(ctx);
return 1;
err: