summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/libssl/s3_cbc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/libssl/s3_cbc.c b/src/lib/libssl/s3_cbc.c
index 004b92118e..74e0562c2d 100644
--- a/src/lib/libssl/s3_cbc.c
+++ b/src/lib/libssl/s3_cbc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: s3_cbc.c,v 1.21 2020/03/16 15:25:13 tb Exp $ */ 1/* $OpenBSD: s3_cbc.c,v 1.22 2020/06/19 21:26:40 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 2012 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 2012 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -145,9 +145,9 @@ tls1_cbc_remove_padding(const SSL* s, SSL3_RECORD_INTERNAL *rec,
145 * decrypted information. Therefore we always have to check the maximum 145 * decrypted information. Therefore we always have to check the maximum
146 * amount of padding possible. (Again, the length of the record is 146 * amount of padding possible. (Again, the length of the record is
147 * public information so we can use it.) */ 147 * public information so we can use it.) */
148 to_check = 255; /* maximum amount of padding. */ 148 to_check = 256; /* maximum amount of padding, inc length byte. */
149 if (to_check > rec->length - 1) 149 if (to_check > rec->length)
150 to_check = rec->length - 1; 150 to_check = rec->length;
151 151
152 for (i = 0; i < to_check; i++) { 152 for (i = 0; i < to_check; i++) {
153 unsigned char mask = constant_time_ge(padding_length, i); 153 unsigned char mask = constant_time_ge(padding_length, i);