[Pkg-gnupg-maint] Bug#773415: [PATCH] gpgkey2ssh: clean up varargs

Daniel Kahn Gillmor dkg at fifthhorseman.net
Fri Dec 19 22:12:05 UTC 2014


* tools/gpgkey2ssh.c (key_to_blob) : ensure that va_end is called.

--

stdarg(3) says:
       Each invocation of va_start() must be matched by a
       corresponding invocation of va_end() in the same function.

Observed by Joshua Rogers <honey at internot.info>

Debian-Bug-Id: 773415
---
 tools/gpgkey2ssh.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/gpgkey2ssh.c b/tools/gpgkey2ssh.c
index 903fb5b..d22c5ac 100644
--- a/tools/gpgkey2ssh.c
+++ b/tools/gpgkey2ssh.c
@@ -224,6 +224,8 @@ key_to_blob (unsigned char **blob, size_t *blob_n, const char *identifier, ...)
       assert (ret == 1);
     }
 
+  va_end (ap);
+
   blob_new_n = ftell (stream);
   rewind (stream);
 
-- 
2.1.3



More information about the Pkg-gnupg-maint mailing list