Details
-
Enhancement
-
Resolution: Fixed
-
P3
-
17
-
b06
-
generic
-
generic
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8263249 | 11.0.12-oracle | Dukebot | P3 | Resolved | Fixed | b01 |
JDK-8263226 | 11.0.12 | Matthias Baesken | P3 | Resolved | Fixed | b01 |
Description
We have a couple of
g= getpwuid_r(getuid(), &resbuf, pwd_buf, sizeof(pwd_buf), &pwd);
calls in the codebase.
Usually we NULL-check pwd after the call because we do not fully trust the return code of the function (it is documented in the codebase why we do not fully trust the return code) . However we miss to initialize pwd at some places before the call, which might we a little problematic and should be improved.
This triggers also Sonar warnings like :
https://sonarcloud.io/project/issues?id=jdk&open=AXaE0dsA8L9hkQskGEbA&resolved=false&types=BUG
g= getpwuid_r(getuid(), &resbuf, pwd_buf, sizeof(pwd_buf), &pwd);
calls in the codebase.
Usually we NULL-check pwd after the call because we do not fully trust the return code of the function (it is documented in the codebase why we do not fully trust the return code) . However we miss to initialize pwd at some places before the call, which might we a little problematic and should be improved.
This triggers also Sonar warnings like :
https://sonarcloud.io/project/issues?id=jdk&open=AXaE0dsA8L9hkQskGEbA&resolved=false&types=BUG
Attachments
Issue Links
- backported by
-
JDK-8263226 initialize last parameter of getpwuid_r
- Resolved
-
JDK-8263249 initialize last parameter of getpwuid_r
- Resolved