diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/a_int.c')
-rw-r--r-- | src/lib/libcrypto/asn1/a_int.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/libcrypto/asn1/a_int.c b/src/lib/libcrypto/asn1/a_int.c index 38a2e1cfa5..1f1e587d39 100644 --- a/src/lib/libcrypto/asn1/a_int.c +++ b/src/lib/libcrypto/asn1/a_int.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_int.c,v 1.42 2022/06/28 19:44:28 jsing Exp $ */ | 1 | /* $OpenBSD: a_int.c,v 1.43 2022/07/09 14:46:42 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 | * |
@@ -297,6 +297,8 @@ ASN1_INTEGER_get(const ASN1_INTEGER *aint) | |||
297 | { | 297 | { |
298 | int64_t val; | 298 | int64_t val; |
299 | 299 | ||
300 | if (aint == NULL) | ||
301 | return 0; | ||
300 | if (!ASN1_INTEGER_get_int64(&val, aint)) | 302 | if (!ASN1_INTEGER_get_int64(&val, aint)) |
301 | return -1; | 303 | return -1; |
302 | if (val < LONG_MIN || val > LONG_MAX) { | 304 | if (val < LONG_MIN || val > LONG_MAX) { |