1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

gpg: Support MPI(0) by sos_read and mpi_print.

* g10/misc.c (mpi_print): Handle the case for MPI(0).
* g10/parse-packet.c (sos_read): Likewise.

--

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2021-10-08 17:23:33 +09:00
parent c450eb1ccb
commit 7b0a7c7148
2 changed files with 5 additions and 2 deletions

View file

@ -229,7 +229,10 @@ sos_read (iobuf_t inp, unsigned int *ret_nread, int secure)
}
nbytes = (nbits + 7) / 8;
buf = secure ? gcry_xmalloc_secure (nbytes) : gcry_xmalloc (nbytes);
if (nbytes)
buf = secure ? gcry_xmalloc_secure (nbytes) : gcry_xmalloc (nbytes);
else
buf = NULL;
p = buf;
for (i = 0; i < nbytes; i++)
{