aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2018-10-24 18:16:26 +0000
committerWerner Koch <[email protected]>2018-10-24 18:30:17 +0000
commit62c75271173f83c5770576aae7b84f55a9ccbc16 (patch)
tree0ec3570625541810470bc1abfc71917d7b551c9e
parentssh: Fix possible infinite loop in case of an read error. (diff)
downloadgnupg-62c75271173f83c5770576aae7b84f55a9ccbc16.tar.gz
gnupg-62c75271173f83c5770576aae7b84f55a9ccbc16.zip
agent: Fix possible release of unitialize var in a genkey error case.
* agent/command.c (cmd_genkey): Initialize 'value'. -- GnuPG-bug-id: 4222 Signed-off-by: Werner Koch <[email protected]> (cherry picked from commit 2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc)
Diffstat (limited to '')
-rw-r--r--agent/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/command.c b/agent/command.c
index 20abb2882..adb2c00f1 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -860,7 +860,7 @@ cmd_genkey (assuan_context_t ctx, char *line)
ctrl_t ctrl = assuan_get_pointer (ctx);
int rc;
int no_protection;
- unsigned char *value;
+ unsigned char *value = NULL;
size_t valuelen;
unsigned char *newpasswd = NULL;
membuf_t outbuf;