зеркало из https://github.com/github/putty.git
Fix a segfault in ssh2_throttle_all_channels.
ssh2_channel_check_throttle should only be called on channels for which c->chan != NULL - that is, only for channels that are not delegated to a sharing downstream. But throttle_all_channels was calling it for _all_ channels, so if it had the bad luck to be called while a sharing downstream was active, ssh2_channel_check_throttle would dereference the null c->chan for the first downstream channel it found.
This commit is contained in:
Родитель
a4b5f66d93
Коммит
d222ed4251
|
@ -1611,7 +1611,8 @@ static void ssh2_throttle_all_channels(ConnectionLayer *cl, bool throttled)
|
|||
s->all_channels_throttled = throttled;
|
||||
|
||||
for (i = 0; NULL != (c = index234(s->channels, i)); i++)
|
||||
ssh2_channel_check_throttle(c);
|
||||
if (!c->sharectx)
|
||||
ssh2_channel_check_throttle(c);
|
||||
}
|
||||
|
||||
static bool ssh2_ldisc_option(ConnectionLayer *cl, int option)
|
||||
|
|
Загрузка…
Ссылка в новой задаче