Details
-
Enhancement
-
Resolution: Fixed
-
P4
-
13
-
b09
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8304116 | 11.0.20-oracle | Fairoz Matte | P4 | Resolved | Fixed | b01 |
JDK-8266632 | 11.0.12 | Mikael Vidstedt | P4 | Resolved | Fixed | b02 |
Description
GCC 8.2 generates warnings for a the uses of strncpy in ImageFileReader::location_path (libjimage/imageFile.cpp):
libjimage/imageFile.cpp:502:16: error: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
strncpy(next, module, length); next += length;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
The code in question is only used by JIMAGE_ResourcePath, and that function is in itself unused so should be removed.
libjimage/imageFile.cpp:502:16: error: 'char* strncpy(char*, const char*, size_t)' output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
strncpy(next, module, length); next += length;
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
The code in question is only used by JIMAGE_ResourcePath, and that function is in itself unused so should be removed.
Attachments
Issue Links
- backported by
-
JDK-8266632 Remove unused JIMAGE_ResourcePath
-
- Resolved
-
-
JDK-8304116 Remove unused JIMAGE_ResourcePath
-
- Resolved
-
- relates to
-
JDK-8213153 Clean up GCC 8 errors
-
- Closed
-