common,tools: Always escape newlines when escaping data.
authorJustus Winter <justus@g10code.com>
Wed, 1 Mar 2017 16:47:47 +0000 (17:47 +0100)
committerJustus Winter <justus@g10code.com>
Thu, 2 Mar 2017 08:31:11 +0000 (09:31 +0100)
commite064c75b08a523f738108428fe0c417a46e66238
tree114eadbf50dcfbdd6b86c7c50cf255c585348fec
parent3cdb7920076be4fc6f7600dfaaa504935104dac9
common,tools: Always escape newlines when escaping data.

* common/stringhelp.c (do_percent_escape): Always escape newlines.
* tools/gpgconf-comp.c (gc_percent_escape): Likewise.
--
Newlines always pose a problem for a line-based communication format.

GnuPG-bug-id: 2387
Signed-off-by: Justus Winter <justus@g10code.com>
common/stringhelp.c
tools/gpgconf-comp.c