mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-02 16:43:03 +01:00
ecc-sos: Fix gpg_mpi_write for opaque bit string.
* g10/build-packet.c (gpg_mpi_write): Handle opaque bit string when it's has exact number of bits. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
4cc4ff03a2
commit
70af2165ec
@ -306,6 +306,7 @@ gpg_mpi_write (iobuf_t out, gcry_mpi_t a, unsigned int *r_nwritten)
|
|||||||
p = gcry_mpi_get_opaque (a, &nbits);
|
p = gcry_mpi_get_opaque (a, &nbits);
|
||||||
if (p)
|
if (p)
|
||||||
{
|
{
|
||||||
|
nbits = ((nbits + 7)/8)*8;
|
||||||
/* Strip leading zero bits. */
|
/* Strip leading zero bits. */
|
||||||
for (; nbits >= 8 && !*p; p++, nbits -= 8)
|
for (; nbits >= 8 && !*p; p++, nbits -= 8)
|
||||||
;
|
;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user