mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
gpg: Fix actual leak and possible leaks in the packet parser.
* g10/packet.h (struct parse_packet_ctx_s): Change LAST_PKT deom a
pointer to its struct.
(init_parse_packet): Adjust for LAST_PKT not being a pointer.
* g10/parse-packet.c (parse): Ditto. Free the last packet before
storing a new one in case of a deep link.
(parse_ring_trust): Adjust for LAST_PKT not being a pointer.
* g10/free-packet.c (free_packet): Ditto.
* g10/t-keydb-get-keyblock.c (do_test): Release keyblock.
--
Fixes-commit: afa8680908
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
64665404e4
commit
7bf24e8146
5 changed files with 26 additions and 19 deletions
|
@ -420,7 +420,7 @@ do_user_id( IOBUF out, int ctb, PKT_user_id *uid )
|
|||
log_assert (ctb_pkttype (ctb) == PKT_USER_ID
|
||||
|| ctb_pkttype (ctb) == PKT_ATTRIBUTE);
|
||||
|
||||
/* We need to take special care that doe user ID with a length of 0:
|
||||
/* We need to take special care of a user ID with a length of 0:
|
||||
* Without forcing HDRLEN to 2 in this case an indeterminate length
|
||||
* packet would be written which is not allowed. Note that we are
|
||||
* always called with a CTB indicating an old packet header format,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue