1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

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 <neal@g10code.com>
This commit is contained in:
Neal H. Walfield 2016-02-23 21:07:09 +01:00
parent 8066f8a347
commit 33ac735a78
2 changed files with 9 additions and 16 deletions

View file

@ -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;