From: Benjamin Kaduk Date: Tue, 14 Mar 2017 16:37:42 +0000 (-0500) Subject: Fix a -Wsign-compare warning X-Git-Tag: OpenSSL_1_1_1-pre1~2047 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=96a5d7fdbaa7aea5e5090e0f7dc2973943986fc9;p=oweals%2Fopenssl.git Fix a -Wsign-compare warning Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/2940) --- diff --git a/apps/s_client.c b/apps/s_client.c index e180772e7f..67e9a92572 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -174,7 +174,7 @@ static unsigned int psk_client_cb(SSL *ssl, const char *hint, char *identity, psk_key); return 0; } - if (key_len > max_psk_len) { + if (max_psk_len > INT_MAX || key_len > (long)max_psk_len) { BIO_printf(bio_err, "psk buffer of callback is too small (%d) for key (%ld)\n", max_psk_len, key_len);