> We have a couple of calls to getpwuid_r  in the codebase, like 
> g= getpwuid_r(getuid(), &resbuf, pwd_buf, sizeof(pwd_buf), &pwd);
> 
> 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   (at other places we already initialize it).
> 
> This triggers also Sonar warnings like :
> https://sonarcloud.io/project/issues?id=jdk&open=AXaE0dsA8L9hkQskGEbA&resolved=false&types=BUG
> 
> 
> Aside from this issue ,  should we in other issue ,  unify the OS versions of 
>  static char* get_user_name(uid_t uid)    in posix code (currently we have it 
> for bsd, linux, aix  but the functions look very similar ?

Matthias Baesken has updated the pull request incrementally with one additional 
commit since the last revision:

  More revert

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2098/files
  - new: https://git.openjdk.java.net/jdk/pull/2098/files/a98df02b..9fa25435

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2098&range=02
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2098&range=01-02

  Stats: 2 lines in 2 files changed: 0 ins; 0 del; 2 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2098.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2098/head:pull/2098

PR: https://git.openjdk.java.net/jdk/pull/2098

Reply via email to