[Pkg-gnupg-maint] Bug#773474: [PATCH] * scd/app-openpgp.c: (get_public_key) correctly close 'fp' upon use.
Joshua Rogers
git at internot.info
Sat Dec 20 00:38:53 UTC 2014
--
Inside the get_public_key function, 'fp' was opened using popen, but incorrectly closed using fclose.
>From pclose(2):
The return value from popen() is a normal standard I/O stream in
all respects save that it must be closed with pclose() rather
than fclose(3).
---
scd/app-openpgp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index daf0310..ed757b4 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -1469,7 +1469,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",
--
1.9.1
More information about the Pkg-gnupg-maint
mailing list