Package: gnupg / 1.4.18-7+deb8u5

0020-scd-fix-get_public_key-for-OpenPGPcard-v1.0.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 3ca1f4098c70d322658cfaaa0d12164e6ac6d5ad Mon Sep 17 00:00:00 2001
From: Joshua Rogers <git@internot.info>
Date: Sat, 20 Dec 2014 11:38:53 +1100
Subject: [PATCH 20/45] scd: fix get_public_key for OpenPGPcard v1.0.

* scd/app-openpgp.c (get_public_key): correctly close 'fp' upon use.

--

Inside the get_public_key function, 'fp' was opened using popen, but
incorrectly closed using fclose.

Debian-Bug-Id: 773474
---
 g10/app-openpgp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/g10/app-openpgp.c b/g10/app-openpgp.c
index a3a977b..b51d418 100644
--- a/g10/app-openpgp.c
+++ b/g10/app-openpgp.c
@@ -1250,7 +1250,7 @@ get_public_key (app_t app, int keyno)
 	}
 
       err = retrieve_key_material (fp, hexkeyid, &m, &mlen, &e, &elen);
-      fclose (fp);
+      pclose (fp);
       if (err)
 	{
 	  log_error ("error while retrieving key material through pipe: %s\n",
-- 
2.1.4