Commit 67903b0
committed
child_process: validate arguments for null bytes
This change adds validation to reject an edge case where the
child_process.spawn() argument strings might contain null bytes
somewhere in between. Such strings were being silently truncated
before, so throwing an error should prevent misuses of this API.
Fixes: #44768
Signed-off-by: Darshan Sen <raisinten@gmail.com>1 parent a50e7c5 commit 67903b0
File tree
2 files changed
+28
-0
lines changed- lib
- test/parallel
2 files changed
+28
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
734 | 735 | | |
735 | 736 | | |
736 | 737 | | |
| 738 | + | |
737 | 739 | | |
738 | 740 | | |
739 | 741 | | |
| |||
818 | 820 | | |
819 | 821 | | |
820 | 822 | | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
821 | 827 | | |
822 | 828 | | |
823 | 829 | | |
| |||
949 | 955 | | |
950 | 956 | | |
951 | 957 | | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
| 966 | + | |
952 | 967 | | |
953 | 968 | | |
954 | 969 | | |
| |||
Lines changed: 13 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments