mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-06-30 19:12:48 -05:00
New BinarySink function 'put_padding'.
It is to put_data what memset is to memcpy. Several places in the code wanted it already, but not _quite_ enough for me to have written it with the rest of the BinarySink infrastructure originally.
This commit is contained in:
3
import.c
3
import.c
@ -1010,8 +1010,7 @@ int openssh_pem_write(const Filename *filename, struct ssh2_userkey *key,
|
||||
origlen = outblob->len;
|
||||
outlen = (origlen + 8) &~ 7;
|
||||
pad = outlen - origlen;
|
||||
for (i = 0; i < pad; i++)
|
||||
put_byte(outblob, pad);
|
||||
put_padding(outblob, pad, pad);
|
||||
|
||||
/*
|
||||
* Invent an iv. Then derive encryption key from passphrase
|
||||
|
Reference in New Issue
Block a user