diff options
-rw-r--r-- | src/lib/libcrypto/bn/bn_convert.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_convert.c b/src/lib/libcrypto/bn/bn_convert.c index 9ad9f58f93..4736099cdc 100644 --- a/src/lib/libcrypto/bn/bn_convert.c +++ b/src/lib/libcrypto/bn/bn_convert.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: bn_convert.c,v 1.11 2023/06/23 10:33:12 tb Exp $ */ | 1 | /* $OpenBSD: bn_convert.c,v 1.12 2023/06/23 10:48:40 tb 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 | * |
@@ -301,7 +301,8 @@ BN_asc2bn(BIGNUM **bnp, const char *s) | |||
301 | return 0; | 301 | return 0; |
302 | 302 | ||
303 | done: | 303 | done: |
304 | BN_set_negative(*bnp, neg); | 304 | if (bnp != NULL && *bnp != NULL) |
305 | BN_set_negative(*bnp, neg); | ||
305 | 306 | ||
306 | return 1; | 307 | return 1; |
307 | } | 308 | } |