common: Fix copying data from the spawned child.
authorJustus Winter <justus@g10code.com>
Tue, 28 Jun 2016 12:38:35 +0000 (14:38 +0200)
committerJustus Winter <justus@g10code.com>
Tue, 28 Jun 2016 12:38:35 +0000 (14:38 +0200)
commit8f79c31b4d465eeaf81c8046c35bb8c34512dd8d
tree4d24e58f860e05e1767e2f0c826d4bfd1e2a76c2
parent52f65281f9743c42a48bf5a3354c9ab0ecdb681a
common: Fix copying data from the spawned child.

Fixes intermittent gpgtar failures.

* common/exectool.c (copy_buffer_do_copy): Initialize 'nwritten'.
(gnupg_exec_tool_stream): Loop until all data is copied.

Signed-off-by: Justus Winter <justus@g10code.com>
common/exectool.c