Fix: invoking x509_name_cannon improperly

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16974)
This commit is contained in:
PW Hu 2021-11-05 17:16:03 +08:00 committed by Pauli
parent ff3e4508bd
commit 09235289c3

View File

@ -219,8 +219,8 @@ static int x509_name_ex_i2d(const ASN1_VALUE **val, unsigned char **out,
if (ret < 0)
return ret;
ret = x509_name_canon(a);
if (ret < 0)
return ret;
if (!ret)
return -1;
}
ret = a->bytes->length;
if (out != NULL) {