зеркало из https://github.com/github/putty.git
Fix cut and paste goof in SSH-2 compression support.
The new SSH-2 BPP has two functions ssh2_bpp_new_outgoing_crypto and ssh2_bpp_new_incoming_crypto, which (due to general symmetry) are _almost_ identical, except that the code that sets up the compression context in the two directions has to call compress_init in the former and decompress_init in the latter. Except that it called compress_init in both, so compression in SSH-2 has been completely broken for a week. How embarrassing. I _remember_ thinking that I'd better make sure to change that one call between the two, but apparently it fell out of my head before I committed.
This commit is contained in:
Родитель
ba5e56cd1b
Коммит
d4304f1b7b
|
@ -145,10 +145,10 @@ void ssh2_bpp_new_incoming_crypto(
|
|||
}
|
||||
|
||||
s->in.comp = compression;
|
||||
/* out_comp is always non-NULL, because no compression is
|
||||
/* in_comp is always non-NULL, because no compression is
|
||||
* indicated by ssh_comp_none. So compress_init always exists, but
|
||||
* it may return a null out_comp_ctx. */
|
||||
s->in.comp_ctx = compression->compress_init();
|
||||
* it may return a null in_comp_ctx. */
|
||||
s->in.comp_ctx = compression->decompress_init();
|
||||
|
||||
/* Clear the pending_newkeys flag, so that handle_input below will
|
||||
* start consuming the input data again. */
|
||||
|
|
Загрузка…
Ссылка в новой задаче