From: Ian Jackson Date: Thu, 20 Aug 2020 18:18:14 +0000 (+0100) Subject: blockcipher_prep: Initialise out parameters to placate gcc X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=020f536563e566c6a17eeb790d2a5e56141e2b74;p=chiark-tcl.git 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 --- 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");