Commit 618caa5
child_process: use stdio.fd even if it is 0
Previously, in _validateStdio we were using stdio.fd || stdio. If
stdio.fd was falsy (or 0 in the case of stdin), then the entire stdio
object would be passed which could cause a crash.
Fixes: #2721
PR-URL: #2727
Reviewed-By: silverwind - Roman Reiss <me@silverwind.io>
Reviewed-By: cjihrig - Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: indutny - Fedor Indutny <fedor.indutny@gmail.com>1 parent 4237373 commit 618caa5Copy full SHA for 618caa5
File tree
Expand file treeCollapse file tree
2 files changed
+13
-1
lines changedOpen diff view settings
Filter options
- lib/internal
- test/parallel
Expand file treeCollapse file tree
2 files changed
+13
-1
lines changedOpen diff view settings
Collapse file
lib/internal/child_process.js
Copy file name to clipboardExpand all lines: lib/internal/child_process.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
713 | 713 | |
714 | 714 | |
715 | 715 | |
716 | | - |
| 716 | + |
717 | 717 | |
718 | 718 | |
719 | 719 | |
|
Collapse file
test/parallel/test-child-process-validate-stdio.js
Copy file name to clipboardExpand all lines: test/parallel/test-child-process-validate-stdio.js+12Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
28 | 28 | |
29 | 29 | |
30 | 30 | |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
0 commit comments