Skip to content

Commit

Permalink
fixup! lib: use primordial
Browse files Browse the repository at this point in the history
Signed-off-by: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
RaisinTen committed Sep 25, 2022
1 parent 919c279 commit c74b77f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/child_process.js
Expand Up @@ -39,6 +39,7 @@ const {
ObjectPrototypeHasOwnProperty,
RegExpPrototypeExec,
SafeSet,
StringPrototypeIncludes,
StringPrototypeSlice,
StringPrototypeToUpperCase,
} = primordials;
Expand Down Expand Up @@ -956,7 +957,7 @@ function execSync(command, options) {

function validateArgumentsNullCheck(args) {
for (let i = 0; i < args.length || 0; ++i) {
if (('' + args[i]).indexOf('\u0000') !== -1) {
if (StringPrototypeIncludes(args[i], '\u0000')) {
throw new ERR_INVALID_ARG_VALUE('args', args, 'cannot contain null bytes');
}
}
Expand Down

0 comments on commit c74b77f

Please sign in to comment.