src: fix vector subscript out of range
PR-URL: https://github.com/nodejs/node/pull/18460 Fixes: https://github.com/nodejs/node/issues/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>
This commit is contained in:
parent
a025723e01
commit
332b56c82b
@ -1007,7 +1007,7 @@ MaybeLocal<Value> InternalMakeCallback(Environment* env,
|
|||||||
} else {
|
} else {
|
||||||
std::vector<Local<Value>> args(1 + argc);
|
std::vector<Local<Value>> args(1 + argc);
|
||||||
args[0] = callback;
|
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]);
|
ret = domain_cb->Call(env->context(), recv, args.size(), &args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user