chiark
/
gitweb
/
~ian
/
chiark-tcl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
96987c7
)
blockcipher_prep: Initialise out parameters to placate gcc
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 20 Aug 2020 18:18:14 +0000
(19:18 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Thu, 20 Aug 2020 18:18:14 +0000
(19:18 +0100)
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 <ijackson@chiark.greenend.org.uk>
crypto/crypto.c
patch
|
blob
|
history
diff --git
a/crypto/crypto.c
b/crypto/crypto.c
index aee2556de1fcde705642944110a78a5bdd6cd1de..6efea24f325ce5b7079087e5b64082b33c32ce39 100644
(file)
--- 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");