diff options
author | PW Hu <jlu.hpw@foxmail.com> | 2021-11-05 17:16:03 +0800 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-11-09 10:07:18 +1000 |
commit | 45838e536c08c74e68536501d6dc2ef9f4d499da (patch) | |
tree | ed5a9eacfffc6f586f204951aae680ace141e11e | |
parent | 80e52bb852673cf6f1908549ff9960d02a644d51 (diff) |
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)
(cherry picked from commit 09235289c377ff998964bb6b074bb2a3ad768fd2)
-rw-r--r-- | crypto/x509/x_name.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/x509/x_name.c b/crypto/x509/x_name.c index aa7f4722b6..2214e580c8 100644 --- a/crypto/x509/x_name.c +++ b/crypto/x509/x_name.c @@ -217,8 +217,8 @@ static int x509_name_ex_i2d(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) { |