Skip to content

Commit

Permalink
src: fix vector subscript out of range
Browse files Browse the repository at this point in the history
PR-URL: #18460
Fixes: #18459
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
  • Loading branch information
apapirovski committed Jan 31, 2018
1 parent a025723 commit 332b56c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,7 @@ MaybeLocal<Value> InternalMakeCallback(Environment* env,
} else {
std::vector<Local<Value>> args(1 + argc);
args[0] = callback;
std::copy(&argv[0], &argv[argc], &args[1]);
std::copy(&argv[0], &argv[argc], args.begin() + 1);
ret = domain_cb->Call(env->context(), recv, args.size(), &args[0]);
}

Expand Down

0 comments on commit 332b56c

Please sign in to comment.