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:
Simon Tatham 2018-06-15 19:08:05 +01:00
Родитель ba5e56cd1b
Коммит d4304f1b7b
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -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. */