aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2024-05-28 11:54:57 +0000
committerWerner Koch <[email protected]>2024-05-29 09:47:13 +0000
commit0b52f837801ca9e518a377121a5ac1ae441bfe60 (patch)
tree3b5b53d30eaf5c648786b34f64ef95f678d36b8a
parentgpg: Avoid a double free on error in the key generation. (diff)
downloadgnupg-0b52f837801ca9e518a377121a5ac1ae441bfe60.tar.gz
gnupg-0b52f837801ca9e518a377121a5ac1ae441bfe60.zip
wks: Make sure that ERR is always initialized.
* tools/wks-util.c (install_key_from_spec_file): Initialize ERR in case the loop is never run. -- This is part of GnuPG-bug-id: 7129 Co-authored-by: Jakub Jelen <[email protected]> (cherry picked from commit 021c27510b52f86a95ae70b5f4ed5d2c3886c3e8)
-rw-r--r--tools/wks-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/wks-util.c b/tools/wks-util.c
index 640116ce8..688375351 100644
--- a/tools/wks-util.c
+++ b/tools/wks-util.c
@@ -1182,6 +1182,7 @@ install_key_from_spec_file (const char *fname)
goto leave;
}
+ err = 0;
while (es_read_line (fp, &line, &linelen, &maxlen) > 0)
{
if (!maxlen)