summaryrefslogtreecommitdiffstats
path: root/lib/libssl/d1_enc.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2012-10-13 21:23:32 +0000
committerdjm <djm@openbsd.org>2012-10-13 21:23:32 +0000
commitec07fdf13572372e9cd617b18f2e2790e6616c8c (patch)
treebc2aaa935cf216bb82963cd07e6b9f736c4cb1e7 /lib/libssl/d1_enc.c
parentsync (diff)
downloadwireguard-openbsd-ec07fdf13572372e9cd617b18f2e2790e6616c8c.tar.xz
wireguard-openbsd-ec07fdf13572372e9cd617b18f2e2790e6616c8c.zip
import OpenSSL-1.0.1c
Diffstat (limited to 'lib/libssl/d1_enc.c')
-rw-r--r--lib/libssl/d1_enc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libssl/d1_enc.c b/lib/libssl/d1_enc.c
index becbab91c21..07a5e97ce5c 100644
--- a/lib/libssl/d1_enc.c
+++ b/lib/libssl/d1_enc.c
@@ -260,7 +260,7 @@ int dtls1_enc(SSL *s, int send)
}
/* TLS 1.0 does not bound the number of padding bytes by the block size.
* All of them must have value 'padding_length'. */
- if (i > (int)rec->length)
+ if (i + bs > (int)rec->length)
{
/* Incorrect padding. SSLerr() and ssl3_alert are done
* by caller: we don't want to reveal whether this is