aboutsummaryrefslogtreecommitdiff
path: root/nDPIsrvd.c
diff options
context:
space:
mode:
Diffstat (limited to 'nDPIsrvd.c')
-rw-r--r--nDPIsrvd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/nDPIsrvd.c b/nDPIsrvd.c
index cb4c08a45..dd539fd73 100644
--- a/nDPIsrvd.c
+++ b/nDPIsrvd.c
@@ -1062,7 +1062,7 @@ static int new_connection(struct nio * const io, int eventfd)
pwsiz = BUFSIZ;
}
char buf[pwsiz];
- if (getpwuid_r(ucred.uid, &pwnam, &buf[0], pwsiz, &pwres) != 0)
+ if (getpwuid_r(ucred.uid, &pwnam, &buf[0], pwsiz, &pwres) != 0 || pwres == NULL)
{
logger(1, "Could not get passwd entry for user id %u", ucred.uid);
return 1;