gpg: Fix memory leaking for long inputs via --command-fd.
authorWerner Koch <wk@gnupg.org>
Wed, 22 Nov 2017 19:54:07 +0000 (20:54 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 22 Nov 2017 19:54:47 +0000 (20:54 +0100)
commitea28ea18f3ee6c9f5e69986f39848398b58e242e
treee9fa094bad034fb7459c9480f82e14b410c2d60a
parent0bb7fd0cab2d53cd0d44b21301b23edfe817e66b
gpg: Fix memory leaking for long inputs via --command-fd.

* g10/cpr.c (do_get_from_fd): Free the old buffer.
--

If the received input is longer than 200 characters we used to leak
the previous allocated buffer.

GnuPG-bug-id: 3528
Signed-off-by: Werner Koch <wk@gnupg.org>
g10/cpr.c