diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/init.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index 4b4bb97ed..33db57d28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2001-10-22 Bart Schaefer <schaefer@zsh.org> + + * 16109: Use a fixed initial fdtable_size to fix crash resulting + from a huge memory allocation, as reported in 16082. + 2001-10-20 Bart Schaefer <schaefer@zsh.org> * Adapted from Stefan Dalibor, 16043: Src/utils.c: checkrmall() 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(); |