From 4b76c491c942f655e7cf013fa63febbd751a1c08 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Mon, 22 Oct 2001 15:14:41 +0000 Subject: Fix fdtable_size crash. --- Src/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Src') 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(); -- cgit 1.4.1