mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Fix a NULL-deref in export due to invalid packet lengths.
* g10/build-packet.c (write_fake_data): Take care of a NULL stored as
opaque MPI.
--
Reported-by: Hanno Böck <hanno@hboeck.de>
(back ported from commit 0835d2f44e
)
This commit is contained in:
parent
7e12ec4c7d
commit
8da836e76f
1 changed files with 2 additions and 1 deletions
|
@ -220,7 +220,8 @@ write_fake_data (IOBUF out, gcry_mpi_t a)
|
|||
void *p;
|
||||
|
||||
p = gcry_mpi_get_opaque ( a, &n );
|
||||
iobuf_write (out, p, (n+7)/8 );
|
||||
if (p)
|
||||
iobuf_write (out, p, (n+7)/8 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue