-
Bug
-
Resolution: Fixed
-
P3
-
7
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2193323 | 7 | Coleen Phillimore | P3 | Closed | Fixed | b94 |
JDK-2197896 | 6u23 | Coleen Phillimore | P3 | Closed | Fixed | b01 |
JDK-2199798 | 6u22m | Coleen Phillimore | P3 | Closed | Fixed | b01 |
JDK-2197606 | 6u21p | Coleen Phillimore | P3 | Closed | Fixed | b03 |
Andreas Kohn reports:
while reading a bit the hotspot sources I noticed a potential issue with
the fix for 6938627 (Make temporary directory use property
java.io.tmpdir when specified) in some places.
Before the fix the callers of get_temp_directory() could hardcode the
size of the filename buffer to a small number, but now that
get_temp_directory() returns a value settable by the user this looks a
bit dangerous.
In particular:
attachListener_linux.cpp:AttachListener::is_init_trigger()
attachListener_solaris.cpp:AttachListener::is_init_trigger()
both use a 128 byte buffer
os_linux.cpp:linux_wrap_code()
uses a 40 byte buffer.
Attached patch changes the buffers to PATH_MAX+1 bytes, the same value
used by other places that call get_temp_directory().
while reading a bit the hotspot sources I noticed a potential issue with
the fix for 6938627 (Make temporary directory use property
java.io.tmpdir when specified) in some places.
Before the fix the callers of get_temp_directory() could hardcode the
size of the filename buffer to a small number, but now that
get_temp_directory() returns a value settable by the user this looks a
bit dangerous.
In particular:
attachListener_linux.cpp:AttachListener::is_init_trigger()
attachListener_solaris.cpp:AttachListener::is_init_trigger()
both use a 128 byte buffer
os_linux.cpp:linux_wrap_code()
uses a 40 byte buffer.
Attached patch changes the buffers to PATH_MAX+1 bytes, the same value
used by other places that call get_temp_directory().
- backported by
-
JDK-2193323 Fix for 6938627 exposes problem with hard-coded buffer sizes
- Closed
-
JDK-2197606 Fix for 6938627 exposes problem with hard-coded buffer sizes
- Closed
-
JDK-2197896 Fix for 6938627 exposes problem with hard-coded buffer sizes
- Closed
-
JDK-2199798 Fix for 6938627 exposes problem with hard-coded buffer sizes
- Closed
- relates to
-
JDK-6950927 Testcase failure sun/management/jmxremote/bootstrap/JvmstatCountersTest.java
- Resolved
-
JDK-6938627 Make temporary directory use property java.io.tmpdir when specified
- Closed
(1 relates to)