summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2022-05-20 07:58:54 +0000
committertb <>2022-05-20 07:58:54 +0000
commitba53f4bba98f619b544683f065e2d2633476ef19 (patch)
tree18d5a86472b947a4aec0bb33febd0adebf2efd53 /src
parent618f8e60b522b47730139a704cf3dfe94d5b6f86 (diff)
downloadopenbsd-ba53f4bba98f619b544683f065e2d2633476ef19.tar.gz
openbsd-ba53f4bba98f619b544683f065e2d2633476ef19.tar.bz2
openbsd-ba53f4bba98f619b544683f065e2d2633476ef19.zip
Don't pass uninitialized pointer to ASN1_STRING_to_UTF8()
Exposed by recent rewrite of ASN1_STRING_to_UTF8(). CID 352831 ok jsing
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/x509/x509_utl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/x509/x509_utl.c b/src/lib/libcrypto/x509/x509_utl.c
index 0fa6ea6d54..47b25fe6c4 100644
--- a/src/lib/libcrypto/x509/x509_utl.c
+++ b/src/lib/libcrypto/x509/x509_utl.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: x509_utl.c,v 1.2 2020/09/13 15:06:17 beck Exp $ */ 1/* $OpenBSD: x509_utl.c,v 1.3 2022/05/20 07:58:54 tb 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. 3 * project.
4 */ 4 */
@@ -954,7 +954,7 @@ do_check_string(ASN1_STRING *a, int cmp_type, equal_fn equal,
954 rv = -1; 954 rv = -1;
955 } else { 955 } else {
956 int astrlen; 956 int astrlen;
957 unsigned char *astr; 957 unsigned char *astr = NULL;
958 astrlen = ASN1_STRING_to_UTF8(&astr, a); 958 astrlen = ASN1_STRING_to_UTF8(&astr, a);
959 if (astrlen < 0) 959 if (astrlen < 0)
960 return -1; 960 return -1;