RFR: 8299340: CreateProcessW lpCommandLine must be mutable [v2]

Roger Riggs rriggs at openjdk.org
Fri May 12 19:38:53 UTC 2023


> Launching of processes on Windows using `ProcessCreateW` with a Unicode character set requires the buffer to be writable. An access violation might occur if `ProcessCreateW` writes to the command line string. The current implementation fetches the command line string using JNI GetStringChars returning a buffer that should not be modified. The code is unchanged since 2015.  There have not been any reported faults in that time.
> 
> This change copies the command line to a separately allocation mutable buffer to satisfy the Windows requirement.

Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:

  Add unicode null to native command line copy

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/13894/files
  - new: https://git.openjdk.org/jdk/pull/13894/files/b8e49a65..41b7f7d1

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=13894&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=13894&range=00-01

  Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/13894.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/13894/head:pull/13894

PR: https://git.openjdk.org/jdk/pull/13894


More information about the core-libs-dev mailing list