projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a10f38
)
Can't check a size_t for < 0.
author
Ben Laurie
<ben@links.org>
Sat, 19 Jan 2013 15:00:27 +0000
(15:00 +0000)
committer
Ben Laurie
<ben@links.org>
Sat, 19 Jan 2013 15:01:18 +0000
(15:01 +0000)
ssl/t1_lib.c
patch
|
blob
|
history
diff --git
a/ssl/t1_lib.c
b/ssl/t1_lib.c
index a2f5a7fa254b8ff428cd11eb727d128cf98d5173..530b1b97ef597bb4665905a23d30cb9d4a5af962 100644
(file)
--- a/
ssl/t1_lib.c
+++ b/
ssl/t1_lib.c
@@
-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 */