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:16:26 +0000
commit2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc (patch)
treeb937e9b91b9449af2ca8a801f6ebb6fcaa997a04
parentssh: Fix possible infinite loop in case of an read error. (diff)
downloadgnupg-2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc.tar.gz
gnupg-2bdc4b6ed97770ed15ec6c5afa02c2e44568a3bc.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]>
-rw-r--r--agent/command.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/agent/command.c b/agent/command.c
index 087175335..7fbf1de1c 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -887,7 +887,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;