]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2002/06/26 08:55:02
authordjm <djm>
Wed, 26 Jun 2002 09:14:43 +0000 (09:14 +0000)
committerdjm <djm>
Wed, 26 Jun 2002 09:14:43 +0000 (09:14 +0000)
     [channels.c]
     limit # of channels to 10000

ChangeLog
channels.c

index 33840488003110eb8f530c9c0e53634060c75960..f8a5b1de2ebc58f12b7e90ceb8dd43cbd0391fd7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -42,6 +42,9 @@
    - markus@cvs.openbsd.org 2002/06/26 08:54:18
      [buffer.c]
      limit append to 1MB and buffers to 10MB
+   - markus@cvs.openbsd.org 2002/06/26 08:55:02
+     [channels.c]
+     limit # of channels to 10000
 
 20020625
  - (stevesk) [INSTALL acconfig.h configure.ac defines.h] remove --with-rsh
index c22e5695c3cbb5f185a66e33f925f32a9126b95d..29eaee7c4d6011841ad8920592aa12cb2d080d6f 100644 (file)
@@ -39,7 +39,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: channels.c,v 1.178 2002/06/24 14:33:27 markus Exp $");
+RCSID("$OpenBSD: channels.c,v 1.179 2002/06/26 08:55:02 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -229,6 +229,9 @@ channel_new(char *ctype, int type, int rfd, int wfd, int efd,
                /* 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);
                debug2("channel: expanding %d", channels_alloc);
                channels = xrealloc(channels, channels_alloc * sizeof(Channel *));
                for (i = found; i < channels_alloc; i++)
This page took 0.047567 seconds and 5 git commands to generate.