From 01792a7f59297a7c134c31426736d1794c082d31 Mon Sep 17 00:00:00 2001 From: Simon Maddocks Date: Sat, 5 Feb 2022 02:24:34 +0000 Subject: [PATCH] Add size clamping --- romulus_m.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/romulus_m.go b/romulus_m.go index e86bbfe..936e632 100644 --- a/romulus_m.go +++ b/romulus_m.go @@ -54,7 +54,7 @@ func Decrypt(key []byte, ciphertext []byte, additionalData []byte) ([]byte, bool return nil, false, errors.New("Failed to decrypt") } - return plaintext, true, nil + return plaintext[:plaintextLen], true, nil } func genNonce() []byte {