mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-18 14:17:03 +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) [dkg: rebased to STABLE-BRANCH-1-4] Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
This commit is contained in:
parent
2e8db53854
commit
68f260f77a
@ -193,6 +193,7 @@ write_fake_data( IOBUF out, MPI a )
|
||||
void *p;
|
||||
|
||||
p = mpi_get_opaque( a, &i );
|
||||
if (p)
|
||||
iobuf_write( out, p, i );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user