diff options
author | ndossche <niels.dossche@ugent.be> | 2023-02-03 13:43:03 +0100 |
---|---|---|
committer | Todd Short <todd.short@me.com> | 2023-02-08 15:35:19 +0100 |
commit | a811b6305b1f98e8ec66b8a426d359150fea69b2 (patch) | |
tree | d6c0c2e5508d3f108118123babbcde88467a81d9 /crypto/bio/bss_acpt.c | |
parent | Restrict the Arm 'LDR REG, =VALUE' pseudo instruction on Neon, to appease clang (diff) | |
download | openssl-a811b6305b1f98e8ec66b8a426d359150fea69b2.tar.xz openssl-a811b6305b1f98e8ec66b8a426d359150fea69b2.zip |
Fix incomplete error check on BIO_set_accept_name()
BIO_set_accept_name() can return error values -1 and 0 according to
my analysis tool and the documentation. Documentation says a value of 1
indicates success. Currently, only an error value != 0 is checked which
erroneously interprets a -1 error return value as success.
Fix it by changing the check condition.
CLA: trivial
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Todd Short <todd.short@me.com>
(Merged from https://github.com/openssl/openssl/pull/20206)
Diffstat (limited to 'crypto/bio/bss_acpt.c')
-rw-r--r-- | crypto/bio/bss_acpt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bio/bss_acpt.c b/crypto/bio/bss_acpt.c index 806186ae41..9514727cdf 100644 --- a/crypto/bio/bss_acpt.c +++ b/crypto/bio/bss_acpt.c @@ -568,7 +568,7 @@ BIO *BIO_new_accept(const char *str) ret = BIO_new(BIO_s_accept()); if (ret == NULL) return NULL; - if (BIO_set_accept_name(ret, str)) + if (BIO_set_accept_name(ret, str) > 0) return ret; BIO_free(ret); return NULL; |