aboutsummaryrefslogtreecommitdiffstats
path: root/guts/getpwent_r.c
diff options
context:
space:
mode:
Diffstat (limited to 'guts/getpwent_r.c')
-rw-r--r--guts/getpwent_r.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/guts/getpwent_r.c b/guts/getpwent_r.c
index aadd97b..d55763e 100644
--- a/guts/getpwent_r.c
+++ b/guts/getpwent_r.c
@@ -10,6 +10,10 @@
/* note that we don't wrap fgetpwent_r, since there's no path
* references in it.
*/
+ if (!pseudo_pwd) {
+ errno = ENOENT;
+ return -1;
+ }
return fgetpwent_r(pseudo_pwd, pwbuf, buf, buflen, pwbufp);
/* return rc;