From 517dd307f9991c10b47c5787c6e70ff5dd7433cf Mon Sep 17 00:00:00 2001 From: Ben Laurie Date: Sat, 19 Jan 2013 15:00:27 +0000 Subject: [PATCH] Can't check a size_t for < 0. --- ssl/t1_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index 1d336c2149..ff25151b32 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -1393,7 +1393,9 @@ unsigned char *ssl_add_clienthello_tlsext(SSL *s, unsigned char *p, unsigned cha const unsigned short ext_len = 2; const unsigned char list_len = 1; - if ((lenmax = limit - ret - 6) < 0) return NULL; + if (limit < ret + 6) + return NULL; + lenmax = limit - ret - 6; s2n(TLSEXT_TYPE_server_authz, ret); /* Extension length: 2 bytes */ -- 2.25.1