Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

child_process: spawn() and spawnSync() validation #8312

Merged
merged 3 commits into from
Dec 25, 2016

Commits on Dec 25, 2016

  1. src: add handle check to spawn_sync

    This commit verifies that the child process handle is of the
    correct type before trying to close it in
    CloseHandlesAndDeleteLoop(). This catches the case where input
    validation failed, and the child process was never actually
    spawned.
    
    Fixes: nodejs#8096
    Fixes: nodejs#8539
    Refs: nodejs#9722
    PR-URL: nodejs#8312
    Reviewed-By: Ben Noordhuis <[email protected]>
    cjihrig committed Dec 25, 2016
    Configuration menu
    Copy the full SHA
    b374ee8 View commit details
    Browse the repository at this point in the history
  2. child_process: improve input validation

    This commit applies stricter input validation in
    normalizeSpawnArguments(), which is run by all of the
    child_process methods. Additional checks are added for spawnSync()
    specific inputs.
    
    Fixes: nodejs#8096
    Fixes: nodejs#8539
    Refs: nodejs#9722
    PR-URL: nodejs#8312
    Reviewed-By: Ben Noordhuis <[email protected]>
    cjihrig committed Dec 25, 2016
    Configuration menu
    Copy the full SHA
    fc7b0dd View commit details
    Browse the repository at this point in the history
  3. src: remove redundant spawn/spawnSync type checks

    This commit removes C++ checks from spawn() and spawnSync()
    that are duplicates of the JavaScript type checking.
    
    Fixes: nodejs#8096
    Fixes: nodejs#8539
    Refs: nodejs#9722
    PR-URL: nodejs#8312
    Reviewed-By: Ben Noordhuis <[email protected]>
    cjihrig committed Dec 25, 2016
    Configuration menu
    Copy the full SHA
    45c9ca7 View commit details
    Browse the repository at this point in the history