mirror of
https://github.com/openssl/openssl.git
synced 2024-12-12 11:33:41 +08:00
PR: 2739
Submitted by: Robin Seggelmann <seggelmann@fh-muenster.de> Fix padding bugs in Heartbeat support.
This commit is contained in:
parent
d441e6d8db
commit
57cb030cea
@ -1422,8 +1422,9 @@ dtls1_process_heartbeat(SSL *s)
|
||||
*bp++ = TLS1_HB_RESPONSE;
|
||||
s2n(payload, bp);
|
||||
memcpy(bp, pl, payload);
|
||||
bp += payload;
|
||||
/* Random padding */
|
||||
RAND_pseudo_bytes(p, padding);
|
||||
RAND_pseudo_bytes(bp, padding);
|
||||
|
||||
r = dtls1_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, 3 + payload + padding);
|
||||
|
||||
|
@ -2467,7 +2467,10 @@ tls1_process_heartbeat(SSL *s)
|
||||
*bp++ = TLS1_HB_RESPONSE;
|
||||
s2n(payload, bp);
|
||||
memcpy(bp, pl, payload);
|
||||
|
||||
bp += payload;
|
||||
/* Random padding */
|
||||
RAND_pseudo_bytes(bp, padding);
|
||||
|
||||
r = ssl3_write_bytes(s, TLS1_RT_HEARTBEAT, buffer, 3 + payload + padding);
|
||||
|
||||
if (r >= 0 && s->msg_callback)
|
||||
|
Loading…
Reference in New Issue
Block a user