Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriyanka Kore <piyukore06@gmail.com>2019-12-01 15:41:39 +0300
committerAnna Henningsen <anna@addaleax.net>2019-12-04 01:19:14 +0300
commitefd6775a509734de5feae5d62c045f3cd2231841 (patch)
tree191f3ae79517c090fc4c9c0b05021f809b4f4936 /src/node_dir.cc
parent4091ea90b69ea9279670d033cc2507a921203101 (diff)
src: fix node_dir.cc memory allocation
PR-URL: https://github.com/nodejs/node/pull/30750 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'src/node_dir.cc')
-rw-r--r--src/node_dir.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/node_dir.cc b/src/node_dir.cc
index 37285928fbd..36366502aaf 100644
--- a/src/node_dir.cc
+++ b/src/node_dir.cc
@@ -172,7 +172,7 @@ static MaybeLocal<Array> DirentListToArray(
int num,
enum encoding encoding,
Local<Value>* err_out) {
- MaybeStackBuffer<Local<Value>, 96> entries(num * 3);
+ MaybeStackBuffer<Local<Value>, 64> entries(num * 2);
// Return an array of all read filenames.
int j = 0;