diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-04-08 05:03:17 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2024-04-08 05:03:17 +0300 |
commit | 3e60e956b0017ae9d329bf242e76c4487fb39b4d (patch) | |
tree | 7ddf02c4367e76b9b24a4fa867a03f1578553776 /src | |
parent | d60ab76f630921dc4deb958fb7892ef6b0e4a7ee (diff) | |
download | postgresql-3e60e956b0017ae9d329bf242e76c4487fb39b4d.tar.gz postgresql-3e60e956b0017ae9d329bf242e76c4487fb39b4d.zip |
Fix check for 'outlen' return from SSL_select_next_proto()
Fixes compiler warning reported by Andres Freund.
Discusssion: https://www.postgresql.org/message-id/20240408015055.xsuahullywpfwyvu@awork3.anarazel.de
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/libpq/be-secure-openssl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/libpq/be-secure-openssl.c b/src/backend/libpq/be-secure-openssl.c index 6e877c01731..29c9af1aabf 100644 --- a/src/backend/libpq/be-secure-openssl.c +++ b/src/backend/libpq/be-secure-openssl.c @@ -1324,7 +1324,7 @@ alpn_cb(SSL *ssl, retval = SSL_select_next_proto((unsigned char **) out, outlen, alpn_protos, sizeof(alpn_protos), in, inlen); - if (*out == NULL || *outlen > sizeof(alpn_protos) || outlen <= 0) + if (*out == NULL || *outlen > sizeof(alpn_protos) || *outlen <= 0) return SSL_TLSEXT_ERR_NOACK; /* can't happen */ if (retval == OPENSSL_NPN_NEGOTIATED) |