This is an archive of the discontinued LLVM Phabricator instance.

[asan] Allow getpwnam(NULL) for binary compatibily
ClosedPublic

Authored by kubamracek on Nov 14 2017, 3:16 PM.

Details

Summary

Calling getpwnam(NULL) is probably a bug, but at least on Darwin, such a call succeeds without segfaulting. I have some existing code that relies on that. To maintain binary compatibility, ASan should also survive a call to getpwnam with NULL.

Diff Detail