diff options
author | Neal H. Walfield <[email protected]> | 2016-02-23 20:07:09 +0000 |
---|---|---|
committer | Neal H. Walfield <[email protected]> | 2016-02-23 20:10:51 +0000 |
commit | 33ac735a781325c4d47cdf6216813866ab93562e (patch) | |
tree | 7841f5eb29dd962c372a5d4f9bd5d158a06b3a95 /common/iobuf.c | |
parent | common: Check for an error before reading. (diff) | |
download | gnupg-33ac735a781325c4d47cdf6216813866ab93562e.tar.gz gnupg-33ac735a781325c4d47cdf6216813866ab93562e.zip |
gpg: Use higher-level functions.
* g10/build-packet.c (do_symkey_enc): Use iobuf_write instead of
iobuf_put in a loop. Use iobuf_copy instead of iobuf_read and
iobuf_write in a loop. Move the memory wiping from here...
* common/iobuf.c (iobuf_copy): ... to here.
--
Signed-off-by: Neal H. Walfield <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | common/iobuf.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/iobuf.c b/common/iobuf.c index 1f2cd3f5d..a0d48c669 100644 --- a/common/iobuf.c +++ b/common/iobuf.c @@ -2253,6 +2253,9 @@ iobuf_copy (iobuf_t dest, iobuf_t source) break; nwrote += nread; } + + /* Burn the buffer. */ + wipememory (temp, sizeof (temp)); xfree (temp); return nwrote; |