about summary refs log tree commit diff
path: root/Src
diff options
context:
space:
mode:
authorBart Schaefer <barts@users.sourceforge.net>2001-10-22 15:14:41 +0000
committerBart Schaefer <barts@users.sourceforge.net>2001-10-22 15:14:41 +0000
commit4b76c491c942f655e7cf013fa63febbd751a1c08 (patch)
tree12cacf4825142856466566b688de28b22cd4166a /Src
parentf7c8c983894770f75180e2faf5268cc9f54753fc (diff)
downloadzsh-4b76c491c942f655e7cf013fa63febbd751a1c08.tar.gz
zsh-4b76c491c942f655e7cf013fa63febbd751a1c08.tar.xz
zsh-4b76c491c942f655e7cf013fa63febbd751a1c08.zip
Fix fdtable_size crash.
Diffstat (limited to 'Src')
-rw-r--r--Src/init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/init.c b/Src/init.c
index f343f3025..ffe873e4f 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1190,7 +1190,8 @@ zsh_main(int argc, char **argv)
 	  break;
     } while (zsh_name);
 
-    fdtable_size = zopenmax();
+    /* Not zopenmax() here: it may return a number too big for zcalloc(). */
+    fdtable_size = 256; /* This grows as necessary, see utils.c:movefd(). */
     fdtable = zcalloc(fdtable_size);
 
     createoptiontable();