From 020f536563e566c6a17eeb790d2a5e56141e2b74 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 20 Aug 2020 19:18:14 +0100 Subject: [PATCH] blockcipher_prep: Initialise out parameters to placate gcc These are all set on the success exit path but GCC is not clever enough to see this. Closes: #968734 Signed-off-by: Ian Jackson --- crypto/crypto.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crypto/crypto.c b/crypto/crypto.c index aee2556..6efea24 100644 --- a/crypto/crypto.c +++ b/crypto/crypto.c @@ -252,6 +252,14 @@ static int blockcipher_prep(Tcl_Interp *ip, Tcl_Obj *key_obj, int rc; CiphKeyValue *key; + /* placate gcc, see Debian #968734 */ + *key_r= 0; + *sched_r= 0; + *iv_r= 0; + *iv_lenbytes_r= 0; + *buffers_r= 0; + *nblocks_r= 0; + if (data_len % alg->blocksize) return cht_staticerr(ip, "block cipher input not whole number of blocks", "HBYTES BLOCKCIPHER LENGTH"); -- 2.30.2