Home GnuPG
Diffusion GnuPG d5c46ac6f447

agent: Fix wrong use of gcry_sexp_build_array
d5c46ac6f447Unpublished

Unpublished Commit · Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

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@gnupg.org>

Details

Provenance
gniibeAuthored on Oct 31 2012, 8:09 AM
wernerCommitted on Nov 2 2012, 4:32 PM
Parents
rG80a34c0b5008: SCD: Upon error, open_pcsc_reader_wrapped does same as _direct.
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rGd5c46ac6f447: agent: Fix wrong use of gcry_sexp_build_array (authored by NIIBE Yutaka <gniibe@fsij.org>).Nov 2 2012, 4:32 PM