repo.or.cz
/
libc-test.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
regression tests for bugs in first versions of new passwd code
[libc-test.git]
/
src
/
regression
/
getpwnam_r-crash.c
blob
1e65b7d160589071c3c32ca7835dd6dbad409f3e
1
// commit fc5a96c9c8aa186effad7520d5df6b616bbfd29d
2
// getpwnam_r should not crash on nonexistant users when errno is 0
3
4
#include <pwd.h>
5
#include
"test.h"
6
7
int
main
(
void
)
8
{
9
struct
passwd
*
pw
,
pwbuf
;
10
char
buf
[
1024
];
11
getpwnam_r
(
"nonsensical_user"
, &
pwbuf
,
buf
,
sizeof
buf
, &
pw
);
12
return
t_status
;
13
}