Clear bytes used for block padding of SSL 3.0 records. (CVE-2011-4576) [include source patch this time!]

This commit is contained in:
Dr. Stephen Henson 2012-01-04 15:38:54 +00:00
parent 528ef87850
commit 8206dba75c

View File

@ -511,6 +511,9 @@ int ssl3_enc(SSL *s, int send)
/* we need to add 'i-1' padding bytes */
l+=i;
/* the last of these zero bytes will be overwritten
* with the padding length. */
memset(&rec->input[rec->length], 0, i);
rec->length+=i;
rec->input[l-1]=(i-1);
}