Fix a -Wsign-compare warning

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2940)
This commit is contained in:
Benjamin Kaduk 2017-03-14 11:37:42 -05:00
parent aebe9e3991
commit 96a5d7fdba

View file

@ -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);