summaryrefslogtreecommitdiff
path: root/Libraries/LibTLS
diff options
context:
space:
mode:
Diffstat (limited to 'Libraries/LibTLS')
-rw-r--r--Libraries/LibTLS/Record.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibTLS/Record.cpp b/Libraries/LibTLS/Record.cpp
index 338528c130..521bee2705 100644
--- a/Libraries/LibTLS/Record.cpp
+++ b/Libraries/LibTLS/Record.cpp
@@ -77,10 +77,10 @@ void TLSv12::update_packet(ByteBuffer& packet)
// If the length is already a multiple a block_size,
// an entire block of padding is added.
// In short, we _never_ have no padding.
- padding = block_size - length % block_size;
- length += padding;
mac_size = mac_length();
length += mac_size;
+ padding = block_size - length % block_size;
+ length += padding;
} else {
block_size = m_aes_local.gcm->cipher().block_size();
padding = 0;