diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/tasn_enc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_enc.c b/src/lib/libcrypto/asn1/tasn_enc.c index d42c5ea369..e0f26b9cdb 100644 --- a/src/lib/libcrypto/asn1/tasn_enc.c +++ b/src/lib/libcrypto/asn1/tasn_enc.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: tasn_enc.c,v 1.25 2022/08/20 17:55:08 jsing Exp $ */ | 1 | /* $OpenBSD: tasn_enc.c,v 1.26 2022/10/17 18:03:15 jsing Exp $ */ |
| 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 2 | /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
| 3 | * project 2000. | 3 | * project 2000. |
| 4 | */ | 4 | */ |
| @@ -494,7 +494,7 @@ static int | |||
| 494 | asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out, | 494 | asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out, |
| 495 | const ASN1_ITEM *it, int tag, int aclass) | 495 | const ASN1_ITEM *it, int tag, int aclass) |
| 496 | { | 496 | { |
| 497 | int len; | 497 | int olen, len; |
| 498 | int utype; | 498 | int utype; |
| 499 | int usetag; | 499 | int usetag; |
| 500 | int ndef = 0; | 500 | int ndef = 0; |
| @@ -505,7 +505,7 @@ asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out, | |||
| 505 | * out the underlying type. | 505 | * out the underlying type. |
| 506 | */ | 506 | */ |
| 507 | 507 | ||
| 508 | len = asn1_ex_i2c(pval, NULL, &utype, it); | 508 | olen = len = asn1_ex_i2c(pval, NULL, &utype, it); |
| 509 | 509 | ||
| 510 | /* If SEQUENCE, SET or OTHER then header is | 510 | /* If SEQUENCE, SET or OTHER then header is |
| 511 | * included in pseudo content octets so don't | 511 | * included in pseudo content octets so don't |
| @@ -541,7 +541,7 @@ asn1_i2d_ex_primitive(ASN1_VALUE **pval, unsigned char **out, | |||
| 541 | if (out) { | 541 | if (out) { |
| 542 | if (usetag) | 542 | if (usetag) |
| 543 | ASN1_put_object(out, ndef, len, tag, aclass); | 543 | ASN1_put_object(out, ndef, len, tag, aclass); |
| 544 | if (asn1_ex_i2c(pval, *out, &utype, it) != len) | 544 | if (asn1_ex_i2c(pval, *out, &utype, it) != olen) |
| 545 | return -1; | 545 | return -1; |
| 546 | if (ndef) | 546 | if (ndef) |
| 547 | ASN1_put_eoc(out); | 547 | ASN1_put_eoc(out); |
