mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Additional corrections to OpenSSH buffer handling.
Obtained from: openssh.org Originally committed to head by: nectar
This commit is contained in:
parent
c9f007b685
commit
3533e7e58a
1 changed files with 3 additions and 2 deletions
|
|
@ -229,12 +229,13 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
|
|||
if (found == -1) {
|
||||
/* There are no free slots. Take last+1 slot and expand the array. */
|
||||
found = channels_alloc;
|
||||
channels_alloc += 10;
|
||||
if (channels_alloc > 10000)
|
||||
fatal("channel_new: internal error: channels_alloc %d "
|
||||
"too big.", channels_alloc);
|
||||
channels = xrealloc(channels,
|
||||
(channels_alloc + 10) * sizeof(Channel *));
|
||||
channels_alloc += 10;
|
||||
debug2("channel: expanding %d", channels_alloc);
|
||||
channels = xrealloc(channels, channels_alloc * sizeof(Channel *));
|
||||
for (i = found; i < channels_alloc; i++)
|
||||
channels[i] = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue