summaryrefslogtreecommitdiffstats
path: root/ssl/d1_pkt.c
diff options
context:
space:
mode:
authorBen Laurie <ben@links.org>2013-01-28 17:33:18 +0000
committerDr. Stephen Henson <steve@openssl.org>2013-02-05 16:50:33 +0000
commitb3a959a337b8083bc855623f24cebaf43a477350 (patch)
tree43d6f17c5ed90d33a78c97a59a6d63b6c67a47eb /ssl/d1_pkt.c
parent2928cb4c82d6516d9e65ede4901a5957d8c39c32 (diff)
Don't crash when processing a zero-length, TLS >= 1.1 record.
The previous CBC patch was bugged in that there was a path through enc() in s3_pkt.c/d1_pkt.c which didn't set orig_len. orig_len would be left at the previous value which could suggest that the packet was a sufficient length when it wasn't. (cherry picked from commit 6cb19b7681f600b2f165e4adc57547b097b475fd) (cherry picked from commit 2c948c1bb218f4ae126e14fd3453d42c62b93235) Conflicts: ssl/s3_enc.c
Diffstat (limited to 'ssl/d1_pkt.c')
-rw-r--r--ssl/d1_pkt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ssl/d1_pkt.c b/ssl/d1_pkt.c
index cdbbe347d9..d367524536 100644
--- a/ssl/d1_pkt.c
+++ b/ssl/d1_pkt.c
@@ -367,6 +367,7 @@ dtls1_process_record(SSL *s)
/* decrypt in place in 'rr->input' */
rr->data=rr->input;
+ rr->orig_len=rr->length;
enc_err = s->method->ssl3_enc->enc(s,0);
if (enc_err <= 0)