mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-03 04:22:47 -05:00
Honour the packet size limit in bare-connection protocol.
When I set up the simplified version of just the ssh-connection protocol we use for connection sharing, I carefully documented at the top of sshshare.c that packets in that protocol variant are limited to just over 0x4000 bytes. And did I remember to actually honour that, by restricting the sizes of outgoing packets when actually speaking the bare connection protocol? I did not. Well, better late than never. Here I introduce a packet size limit that can be imposed by the BPP, and arrange for sshconnection.c to take the min of that and any given channel's max packet size as sent by the remote end. All BPPs except ssh2bpp-bare set it to the no-op value of the largest possible uint32_t.
This commit is contained in:
@ -51,6 +51,7 @@ static const struct BinaryPacketProtocolVtable ssh_verstring_vtable = {
|
||||
ssh_verstring_handle_output,
|
||||
ssh_verstring_new_pktout,
|
||||
ssh_verstring_queue_disconnect,
|
||||
0xFFFFFFFF, /* no special packet size limit for this bpp */
|
||||
};
|
||||
|
||||
static void ssh_detect_bugs(struct ssh_verstring_state *s);
|
||||
|
Reference in New Issue
Block a user