Skip to content

Commit

Permalink
8295304: Runtime support improvements
Browse files Browse the repository at this point in the history
Reviewed-by: mbalao
Backport-of: 9c31d51bd5fc17e3914142c2461f3abfe71651d0
  • Loading branch information
Aleksei Voitylov authored and RealCLanger committed Apr 12, 2023
1 parent 432b9f0 commit 2d806d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/java.base/share/classes/java/lang/ProcessBuilder.java
Expand Up @@ -1097,8 +1097,8 @@ private Process start(Redirect[] redirects) throws IOException {

String dir = directory == null ? null : directory.toString();

for (int i = 1; i < cmdarray.length; i++) {
if (cmdarray[i].indexOf('\u0000') >= 0) {
for (String s : cmdarray) {
if (s.indexOf('\u0000') >= 0) {
throw new IOException("invalid null character in command");
}
}
Expand Down

0 comments on commit 2d806d0

Please sign in to comment.