Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
J
jdk17u
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
einsteinathome
openjdk
jdk17u
Commits
ef24cdf6
Commit
ef24cdf6
authored
Jul 6, 2024
by
George Adams
Browse files
Options
Downloads
Patches
Plain Diff
8307848: update for deprecated sprintf for jdk.attach
Backport-of: 15358636cf67fb570231ec8521533bd2d3146b65
parent
b1cb2111
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c
+3
-3
3 additions, 3 deletions
src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c
with
3 additions
and
3 deletions
src/jdk.attach/windows/native/libattach/VirtualMachineImpl.c
+
3
−
3
View file @
ef24cdf6
/*
/*
* Copyright (c) 2005, 202
1
, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 202
3
, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
*
* This code is free software; you can redistribute it and/or modify it
* This code is free software; you can redistribute it and/or modify it
...
@@ -209,7 +209,7 @@ JNIEXPORT jlong JNICALL Java_sun_tools_attach_VirtualMachineImpl_openProcess
...
@@ -209,7 +209,7 @@ JNIEXPORT jlong JNICALL Java_sun_tools_attach_VirtualMachineImpl_openProcess
}
else
{
}
else
{
char
err_mesg
[
255
];
char
err_mesg
[
255
];
/* include the last error in the default detail message */
/* include the last error in the default detail message */
sprintf
(
err_mesg
,
"OpenProcess(pid=%d) failed; LastError=0x%x"
,
s
n
printf
(
err_mesg
,
sizeof
(
err_mesg
),
"OpenProcess(pid=%d) failed; LastError=0x%x"
,
(
int
)
pid
,
(
int
)
GetLastError
());
(
int
)
pid
,
(
int
)
GetLastError
());
JNU_ThrowIOExceptionWithLastError
(
env
,
err_mesg
);
JNU_ThrowIOExceptionWithLastError
(
env
,
err_mesg
);
}
}
...
@@ -492,7 +492,7 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_enqueue
...
@@ -492,7 +492,7 @@ JNIEXPORT void JNICALL Java_sun_tools_attach_VirtualMachineImpl_enqueue
break
;
break
;
default
:
{
default
:
{
char
errmsg
[
128
];
char
errmsg
[
128
];
sprintf
(
errmsg
,
"Remote thread failed for unknown reason (%d)"
,
exitCode
);
s
n
printf
(
errmsg
,
sizeof
(
errmsg
),
"Remote thread failed for unknown reason (%d)"
,
exitCode
);
JNU_ThrowInternalError
(
env
,
errmsg
);
JNU_ThrowInternalError
(
env
,
errmsg
);
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment