Integrated: 8299340: CreateProcessW lpCommandLine must be mutable
Roger Riggs
rriggs at openjdk.org
Mon May 15 18:05:55 UTC 2023
On Tue, 9 May 2023 21:46:51 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> 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.
This pull request has now been integrated.
Changeset: 0f7b1c54
Author: Roger Riggs <rriggs at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/0f7b1c549fbe4a90819fe3065dadf0b3e0ae94f3
Stats: 18 lines in 1 file changed: 10 ins; 0 del; 8 mod
8299340: CreateProcessW lpCommandLine must be mutable
Reviewed-by: naoto
-------------
PR: https://git.openjdk.org/jdk/pull/13894
More information about the core-libs-dev
mailing list