From 96a5d7fdbaa7aea5e5090e0f7dc2973943986fc9 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Tue, 14 Mar 2017 11:37:42 -0500 Subject: [PATCH] Fix a -Wsign-compare warning Reviewed-by: Rich Salz Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/2940) --- apps/s_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.25.1