1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00
Daniel Kahn Gillmor efffd9907b agent: Do not place a trailing NUL byte on S-expressions
* agent/pkdecrypt.c (agent_pkdecrypt): Avoid appending a trailing NUL
byte at the end of the generated S-expression.

--

In many cases, a canonical S-expression may have an embedded NUL
anyway (especially if it contains raw cryptographic key material or
other high-entropy bytestrings), so trying to treat a canonical
S-expression as a C string is likely to be dangerous -- better to not
leave any such expectations.

With the previous commit addressing the otherwise brittle consumers of
pkdecrypt, this should now be safe to do.

GnuPG-bug-id: 4652
Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2019-07-24 19:56:23 -04:00
..
2015-10-28 10:20:17 +01:00
2017-03-07 19:22:48 +09:00