Skip to content

Commit

Permalink
src: fix node_dir.cc memory allocation
Browse files Browse the repository at this point in the history
PR-URL: #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>
  • Loading branch information
piyukore06 authored and addaleax committed Dec 3, 2019
1 parent 4091ea9 commit efd6775
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node_dir.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit efd6775

Please sign in to comment.