[git] GnuPG - branch, STABLE-BRANCH-2-0, updated. gnupg-2.0.19-37-gd5c46ac
by NIIBE Yutaka
cvs at cvs.gnupg.org
Fri Nov 2 18:00:14 CET 2012
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, STABLE-BRANCH-2-0 has been updated
via d5c46ac6f447e92722fd7e904bf520b1265a0ce0 (commit)
from 80a34c0b5008c59979561dcee40536d7e25246f6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d5c46ac6f447e92722fd7e904bf520b1265a0ce0
Author: NIIBE Yutaka <gniibe at fsij.org>
Date: Wed Oct 31 16:09:06 2012 +0900
agent: Fix wrong use of gcry_sexp_build_array
* findkey.c (agent_public_key_from_file): Fix use of
gcry_sexp_build_array.
--
A test case leading to a segv in Libgcrypt is
gpg-connect-agent \
"READKEY 9277C5875C8AFFCB727661C18BE4E0A0DEED9260" /bye
The keygrip was created by "monkeysphere s", which has a comment.
gcry_sexp_build_array expects pointers to the arguments which is quite
surprising. Probably ARG_NEXT was accidentally implemented wrongly.
Anyway, we can't do anything about it and thus need to fix the check
the users of this function.
Some-comments-by: Werner Koch <wk at gnupg.org>
diff --git a/agent/findkey.c b/agent/findkey.c
index 800db88..550e403 100644
--- a/agent/findkey.c
+++ b/agent/findkey.c
@@ -824,15 +824,15 @@ agent_public_key_from_file (ctrl_t ctrl,
{
p = stpcpy (p, "(uri %b)");
assert (argidx+1 < DIM (args));
- args[argidx++] = (void *)uri_length;
- args[argidx++] = (void *)uri;
+ args[argidx++] = (void *)&uri_length;
+ args[argidx++] = (void *)&uri;
}
if (comment)
{
p = stpcpy (p, "(comment %b)");
assert (argidx+1 < DIM (args));
- args[argidx++] = (void *)comment_length;
- args[argidx++] = (void*)comment;
+ args[argidx++] = (void *)&comment_length;
+ args[argidx++] = (void*)&comment;
}
*p++ = ')';
*p = 0;
-----------------------------------------------------------------------
Summary of changes:
agent/findkey.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list