mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-22 14:57:02 +01: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 0835d2f44ef62eab51fce6a927908f544e01cf8f)
This commit is contained in:
parent
7e12ec4c7d
commit
8da836e76f
@ -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…
x
Reference in New Issue
Block a user