Home GnuPG
Diffusion GnuPG 76c8122adfed

gpg: Fix segv due to NULL value stored as opaque MPI.
76c8122adfedUnpublished

Unpublished Commit · Learn More

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

Description

gpg: Fix segv due to NULL value stored as opaque MPI.

* g10/build-packet.c (gpg_mpi_write): Check for NULL return from
gcry_mpi_get_opaque.
(gpg_mpi_write_nohdr, do_key): Ditto.
* g10/keyid.c (hash_public_key): Ditto.

This fix extends commmit 0835d2f44ef62eab51fce6a927908f544e01cf8f.

gpg2 --export --no-default-keyring --keyring TESTDATA

With TESTDATA being below after unpacking.

-----BEGIN PGP ARMORED FILE-----

mBMEhdkMmS8BcX8F8F5voEhQAQmBMEnAAAZwAAo4D/f/8EhQAAAIAEnP8EhQAQ
iBMEnP8AAAAABf8jIID
/8EhQYQmBMEnIUAEIgTBKT/AAAAAAUAACCA/f//BIUA
EJgTBJx/AP8ABPPzBJx/AP8ABPPz

2yE0

-----END PGP ARMORED FILE-----

  • Reported-by: Jodie Cunningham
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Feb 19 2015, 4:29 PM
Parents
rG07a71da479da: scd: Fix regression in 2.1.2 (due to commit 2183683)
Branches
Unknown
Tags
Unknown

Event Timeline

Werner Koch <wk@gnupg.org> committed rG76c8122adfed: gpg: Fix segv due to NULL value stored as opaque MPI. (authored by Werner Koch <wk@gnupg.org>).Feb 19 2015, 4:29 PM