regression tests for bugs in first versions of new passwd code
[libc-test.git] / src / regression / getpwnam_r-crash.c
blob1e65b7d160589071c3c32ca7835dd6dbad409f3e
1 // commit fc5a96c9c8aa186effad7520d5df6b616bbfd29d
2 // getpwnam_r should not crash on nonexistant users when errno is 0
4 #include <pwd.h>
5 #include "test.h"
7 int main(void)
9 struct passwd *pw, pwbuf;
10 char buf[1024];
11 getpwnam_r("nonsensical_user", &pwbuf, buf, sizeof buf, &pw);
12 return t_status;