From a895729b9e75ea5b5353d80188c541f64bbcf5d9 Mon Sep 17 00:00:00 2001 From: Peter Nirschl Date: Sat, 21 Oct 2017 19:18:19 +0200 Subject: [PATCH] :bug: Fix result propagation in SymmetricCipherGcrypt::process The boolean 'ok' has always been set to true, regardless of possible errors. --- src/crypto/SymmetricCipherGcrypt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/crypto/SymmetricCipherGcrypt.cpp b/src/crypto/SymmetricCipherGcrypt.cpp index cd4324065..e600a7edb 100644 --- a/src/crypto/SymmetricCipherGcrypt.cpp +++ b/src/crypto/SymmetricCipherGcrypt.cpp @@ -148,9 +148,10 @@ QByteArray SymmetricCipherGcrypt::process(const QByteArray& data, bool* ok) if (error != 0) { setErrorString(error); *ok = false; + } else { + *ok = true; } - *ok = true; return result; }