diff options
author | Ben Laurie <ben@openssl.org> | 2002-11-13 15:43:43 +0000 |
---|---|---|
committer | Ben Laurie <ben@openssl.org> | 2002-11-13 15:43:43 +0000 |
commit | 54a656ef081f72a740c550ebd8099b40b8b5cde0 (patch) | |
tree | 9b3638b56848c7f0648b84cfa7ad056116b37a1b /ssl/s2_pkt.c | |
parent | 8f797f14b8ff7d3d5cb04443284259a0c94860b3 (diff) |
Security fixes brought forward from 0.9.7.
Diffstat (limited to 'ssl/s2_pkt.c')
-rw-r--r-- | ssl/s2_pkt.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ssl/s2_pkt.c b/ssl/s2_pkt.c index cf0aee2bd6..d82f137613 100644 --- a/ssl/s2_pkt.c +++ b/ssl/s2_pkt.c @@ -113,6 +113,7 @@ #ifndef OPENSSL_NO_SSL2 #include <stdio.h> #include <errno.h> +#include "cryptlib.h" #define USE_SOCKETS static int read_n(SSL *s,unsigned int n,unsigned int max,unsigned int extend); @@ -247,6 +248,7 @@ static int ssl2_read_internal(SSL *s, void *buf, int len, int peek) else { mac_size=EVP_MD_size(s->read_hash); + OPENSSL_assert(mac_size <= MAX_MAC_SIZE); s->s2->mac_data=p; s->s2->ract_data= &p[mac_size]; if (s->s2->padding + mac_size > s->s2->rlength) |