diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2016-11-06 10:21:30 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@herrb.eu> | 2020-07-14 15:52:35 +0200 |
commit | 8b608fe8da3e6ec6cd4b90c5c58a739bb3713e1e (patch) | |
tree | 4a8b627a76079c9958a080aa928b18569bb0114e /greeter | |
parent | 87e6642de9b988641dc2dba6d107eaec808a1379 (diff) |
Check strdup return value
Diffstat (limited to 'greeter')
-rw-r--r-- | greeter/verify.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/greeter/verify.c b/greeter/verify.c index 4c4a84c..6dcdb08 100644 --- a/greeter/verify.c +++ b/greeter/verify.c @@ -218,6 +218,8 @@ autoLoginEnv(struct display *d, struct verify_info *verify, return 0; greet->name = strdup(d->autoLogin); + if (greet->name == NULL) + return 0; verify->uid = p->pw_uid; verify->gid = p->pw_gid; home = p->pw_dir; |