[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 2/5] crypto/secret: fix inconsequential errors.
From: |
Daniel P . Berrangé |
Subject: |
[PULL 2/5] crypto/secret: fix inconsequential errors. |
Date: |
Thu, 7 May 2020 12:58:00 +0100 |
From: Alexey Krasikov <address@hidden>
Change condition from QCRYPTO_SECRET_FORMAT_RAW
to QCRYPTO_SECRET_FORMAT_BASE64 in if-operator, because
this is potential error if you add another format value.
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: Alexey Krasikov <address@hidden>
Signed-off-by: Daniel P. Berrangé <address@hidden>
---
crypto/secret.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/secret.c b/crypto/secret.c
index 5fb6bbe59c..a846a3c87c 100644
--- a/crypto/secret.c
+++ b/crypto/secret.c
@@ -204,7 +204,7 @@ qcrypto_secret_prop_set_loaded(Object *obj,
input = output;
inputlen = outputlen;
} else {
- if (secret->format != QCRYPTO_SECRET_FORMAT_RAW) {
+ if (secret->format == QCRYPTO_SECRET_FORMAT_BASE64) {
qcrypto_secret_decode(input, inputlen,
&output, &outputlen, &local_err);
g_free(input);
--
2.26.2
- [PULL 0/5] Misc crypto subsystem fixes, Daniel P . Berrangé, 2020/05/07
- [PULL 1/5] crypto: fix getter of a QCryptoSecret's property, Daniel P . Berrangé, 2020/05/07
- [PULL 3/5] crypto: Redundant type conversion for AES_KEY pointer, Daniel P . Berrangé, 2020/05/07
- [PULL 2/5] crypto/secret: fix inconsequential errors.,
Daniel P . Berrangé <=
- [PULL 5/5] crypto: extend hash benchmark to cover more algorithms, Daniel P . Berrangé, 2020/05/07
- [PULL 4/5] block: luks: better error message when creating too large files, Daniel P . Berrangé, 2020/05/07
- Re: [PULL 0/5] Misc crypto subsystem fixes, Peter Maydell, 2020/05/07