aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/keybox-openpgp.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2016-01-06 07:39:08 +0000
committerWerner Koch <[email protected]>2016-01-06 07:39:08 +0000
commitdb82b6131d437bf6ba34db0e08b7dfa9edb11e45 (patch)
treed56b3bd97e7301fa960d81c39b516256a92b133f /kbx/keybox-openpgp.c
parentdirmngr: Silence one regression test. (diff)
downloadgnupg-db82b6131d437bf6ba34db0e08b7dfa9edb11e45.tar.gz
gnupg-db82b6131d437bf6ba34db0e08b7dfa9edb11e45.zip
kbx: Avoid faulty fclose in an error case.
* kbx/keybox-update.c (blob_filecopy): Do not close an uninitialized file pointer after a failure to create a temp file. * kbx/keybox-openpgp.c (next_packet): Remove duplicate assignment of PKTLEN. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'kbx/keybox-openpgp.c')
-rw-r--r--kbx/keybox-openpgp.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/kbx/keybox-openpgp.c b/kbx/keybox-openpgp.c
index a5f602b7b..a0e4ab9f7 100644
--- a/kbx/keybox-openpgp.c
+++ b/kbx/keybox-openpgp.c
@@ -71,7 +71,6 @@ next_packet (unsigned char const **bufptr, size_t *buflen,
if ( !(ctb & 0x80) )
return gpg_error (GPG_ERR_INV_PACKET); /* Invalid CTB. */
- pktlen = 0;
if ((ctb & 0x40)) /* New style (OpenPGP) CTB. */
{
pkttype = (ctb & 0x3f);