RFR: JDK-8298248: Limit sscanf outbut width in cgroup file parsers
Severin Gehwolf
sgehwolf at openjdk.org
Wed Dec 7 10:45:03 UTC 2022
On Wed, 7 Dec 2022 09:43:23 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> With the explicit width specifiers I followed what other incarnations of this macro already do, so I did not make it worse. A code revamp would be certainly nice.
Yes agreed. Those macros are a bit dangerous. Recently, when I looked into [JDK-8297274](https://bugs.openjdk.org/browse/JDK-8297274?focusedCommentId=14540238&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-14540238url) there was another oddity that stood out. Reading values in as `julong` and then casting them to `jlong` :-/
-------------
PR: https://git.openjdk.org/jdk/pull/11554
More information about the hotspot-runtime-dev
mailing list