Commit 9ccc6f43 authored by Ben Laurie's avatar Ben Laurie
Browse files

Can't check a size_t for < 0.

parent 6a10f38d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1391,7 +1391,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 */