mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-05 21:42:47 -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
ssh.c
3
ssh.c
@ -2803,8 +2803,7 @@ static void ssh2_add_sigblob(Ssh ssh, PktOut *pkt,
|
||||
strbuf *substr = strbuf_new();
|
||||
put_data(substr, sigblob, sig_prefix_len);
|
||||
put_uint32(substr, mod_mp.len);
|
||||
while (mod_mp.len-- > sig_mp.len)
|
||||
put_byte(substr, 0);
|
||||
put_padding(substr, mod_mp.len - sig_mp.len, 0);
|
||||
put_data(substr, sig_mp.ptr, sig_mp.len);
|
||||
put_stringsb(pkt, substr);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user