diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mul.c')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_mul.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/bn/bn_mul.c b/src/lib/libcrypto/bn/bn_mul.c index daba02d6ca..7794d59707 100644 --- a/src/lib/libcrypto/bn/bn_mul.c +++ b/src/lib/libcrypto/bn/bn_mul.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_mul.c,v 1.19 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: bn_mul.c,v 1.20 2015/02/09 15:49:22 jsing Exp $ */ |
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
| 3 | * All rights reserved. | 3 | * All rights reserved. |
| 4 | * | 4 | * |
| @@ -1012,8 +1012,7 @@ BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) | |||
| 1012 | j = 1 << (j - 1); | 1012 | j = 1 << (j - 1); |
| 1013 | assert(j <= al || j <= bl); | 1013 | assert(j <= al || j <= bl); |
| 1014 | k = j + j; | 1014 | k = j + j; |
| 1015 | t = BN_CTX_get(ctx); | 1015 | if ((t = BN_CTX_get(ctx)) == NULL) |
| 1016 | if (t == NULL) | ||
| 1017 | goto err; | 1016 | goto err; |
| 1018 | if (al > j || bl > j) { | 1017 | if (al > j || bl > j) { |
| 1019 | if (bn_wexpand(t, k * 4) == NULL) | 1018 | if (bn_wexpand(t, k * 4) == NULL) |
| @@ -1057,7 +1056,8 @@ BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) | |||
| 1057 | j = BN_num_bits_word((BN_ULONG)al); | 1056 | j = BN_num_bits_word((BN_ULONG)al); |
| 1058 | j = 1 << (j - 1); | 1057 | j = 1 << (j - 1); |
| 1059 | k = j + j; | 1058 | k = j + j; |
| 1060 | t = BN_CTX_get(ctx); | 1059 | if ((t = BN_CTX_get(ctx)) == NULL) |
| 1060 | goto err; | ||
| 1061 | if (al == j) /* exact multiple */ | 1061 | if (al == j) /* exact multiple */ |
| 1062 | { | 1062 | { |
| 1063 | if (bn_wexpand(t, k * 2) == NULL) | 1063 | if (bn_wexpand(t, k * 2) == NULL) |
