Home GnuPG
Diffusion GnuPG 4cf3cc6e3d48

gpg: Do not read from uninitialized memory with --list-packets.

Description

gpg: Do not read from uninitialized memory with --list-packets.

* g10/parse-packet.c (parse_plaintext): Fill up the allocated NAME.

This actually does not harm because we merely display a buffer
allocated by ourselves. However, we better tell Valgrind about it so
that we don't need to track this thing down ever again.

Test using a corrupted literal data packet:

echo cb 0a 75 ff 59 ae 90 d5  74 65 73 74 | \
  undump |\
  valgrind gpg --list-packets >/dev/null
  • Reported-by: Sebastian Schinzel
  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Nov 26 2017, 6:33 PM
Parents
rG18af15249de5: agent: New option --auto-expand-secmem.
Branches
Unknown
Tags
Unknown