diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_int.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/asn1/a_int.c b/src/lib/libcrypto/asn1/a_int.c index 6a24c5183c..1f4778922d 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.45 2022/08/20 18:17:33 jsing Exp $ */ | 1 | /* $OpenBSD: a_int.c,v 1.46 2022/08/28 17:49:25 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 | * |
| @@ -553,7 +553,9 @@ i2c_ASN1_INTEGER_cbb(ASN1_INTEGER *aint, CBB *cbb) | |||
| 553 | CBS cbs; | 553 | CBS cbs; |
| 554 | int ret = 0; | 554 | int ret = 0; |
| 555 | 555 | ||
| 556 | if (aint->data == NULL || aint->length < 0) | 556 | if (aint->length < 0) |
| 557 | goto err; | ||
| 558 | if (aint->data == NULL && aint->length != 0) | ||
| 557 | goto err; | 559 | goto err; |
| 558 | 560 | ||
| 559 | if ((aint->type & ~V_ASN1_NEG) != V_ASN1_ENUMERATED && | 561 | if ((aint->type & ~V_ASN1_NEG) != V_ASN1_ENUMERATED && |
