diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-10-30 07:21:20 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-10-30 07:21:20 +0100 |
commit | dd4fb1c8f668f78fbcf5052e80c5c40d4cdad20c (patch) | |
tree | 86daef0ea730c72991fe1ee8196b842e235523ec /g10/export.c | |
parent | gpg: New command --quick-revoke-sig (diff) | |
download | gnupg2-dd4fb1c8f668f78fbcf5052e80c5c40d4cdad20c.tar.xz gnupg2-dd4fb1c8f668f78fbcf5052e80c5c40d4cdad20c.zip |
gpg: Fix first zero-byte case for SOS handling.
* g10/export.c (transfer_format_to_openpgp): Check the first byte.
* g10/pkglue.c (sexp_extract_param_sos): Likewise.
--
GnuPG-bug-id: 5116
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10/export.c')
-rw-r--r-- | g10/export.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/export.c b/g10/export.c index a9eba1544..8a4f6f1f3 100644 --- a/g10/export.c +++ b/g10/export.c @@ -985,7 +985,7 @@ transfer_format_to_openpgp (gcry_sexp_t s_pgp, PKT_public_key *pk) unsigned int nbits = valuelen*8; const unsigned char *p = value; - if (nbits >= 8 && !(*p & 0x80)) + if (*p && nbits >= 8 && !(*p & 0x80)) if (--nbits >= 7 && !(*p & 0x40)) if (--nbits >= 6 && !(*p & 0x20)) if (--nbits >= 5 && !(*p & 0x10)) |