1
0
mirror of https://github.com/mariadb-corporation/mariadb-connector-c.git synced 2025-08-07 02:42:49 +03:00

Fix SSL_read/write return value checking in ma_tls_async_check_result

SSL_{read,write}'s return values == 0 signify the operation was
unsuccessful, but here it's being treated as success. Other calls of
these functions already properly checks the return value.

Signed-off-by: Josh Hunt <johunt@akamai.com>
This commit is contained in:
Josh Hunt
2024-03-27 16:50:20 -07:00
committed by Georg Richter
parent 89d11c8b05
commit 4c1c7f37d6
2 changed files with 2 additions and 2 deletions

View File

@@ -140,7 +140,7 @@ my_ssl_async_check_result(int res, struct mysql_async_context *b, MARIADB_SSL *c
{
int ssl_err;
b->events_to_wait_for= 0;
if (res >= 0)
if (res > 0)
return 1;
ssl_err= SSL_get_error(ssl, res);
if (ssl_err == SSL_ERROR_WANT_READ)