It is possible for getpwuid() to return NULL. Such a failure will no longer cause a segfault. However, the call to getpwuid() may normally not be reachable.