diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/asn1/a_string.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/a_string.c b/src/lib/libcrypto/asn1/a_string.c index 90e363e9c7..9086d3bec8 100644 --- a/src/lib/libcrypto/asn1/a_string.c +++ b/src/lib/libcrypto/asn1/a_string.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: a_string.c,v 1.7 2022/03/17 17:17:58 jsing Exp $ */ | 1 | /* $OpenBSD: a_string.c,v 1.8 2022/05/16 20:41:24 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 | * |
| @@ -276,7 +276,8 @@ ASN1_STRING_print(BIO *bp, const ASN1_STRING *astr) | |||
| 276 | int | 276 | int |
| 277 | ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in) | 277 | ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in) |
| 278 | { | 278 | { |
| 279 | ASN1_STRING stmp, *str = &stmp; | 279 | ASN1_STRING stmp = { 0 }; |
| 280 | ASN1_STRING *str = &stmp; | ||
| 280 | int mbflag, ret; | 281 | int mbflag, ret; |
| 281 | 282 | ||
| 282 | if (in == NULL) | 283 | if (in == NULL) |
| @@ -287,8 +288,6 @@ ASN1_STRING_to_UTF8(unsigned char **out, const ASN1_STRING *in) | |||
| 287 | 288 | ||
| 288 | mbflag |= MBSTRING_FLAG; | 289 | mbflag |= MBSTRING_FLAG; |
| 289 | 290 | ||
| 290 | stmp.data = NULL; | ||
| 291 | stmp.length = 0; | ||
| 292 | ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, | 291 | ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, |
| 293 | B_ASN1_UTF8STRING); | 292 | B_ASN1_UTF8STRING); |
| 294 | if (ret < 0) | 293 | if (ret < 0) |
