mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 12:09:14 +00:00
8345676: [ubsan] ProcessImpl_md.c:561:40: runtime error: applying zero offset to null pointer on macOS aarch64
Reviewed-by: rriggs
This commit is contained in:
parent
0a81676fae
commit
0285020c7e
@ -558,7 +558,9 @@ spawnChild(JNIEnv *env, jobject process, ChildStuff *c, const char *helperpath)
|
||||
return -1;
|
||||
}
|
||||
offset = copystrings(buf, 0, &c->argv[0]);
|
||||
offset = copystrings(buf, offset, &c->envv[0]);
|
||||
if (c->envv != NULL) {
|
||||
offset = copystrings(buf, offset, &c->envv[0]);
|
||||
}
|
||||
if (c->pdir != NULL) {
|
||||
if (sp.dirlen > 0) {
|
||||
memcpy(buf+offset, c->pdir, sp.dirlen);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user