From 8b608fe8da3e6ec6cd4b90c5c58a739bb3713e1e Mon Sep 17 00:00:00 2001 From: Matthieu Herrb Date: Sun, 6 Nov 2016 10:21:30 +0000 Subject: Check strdup return value --- greeter/verify.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'greeter') 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; -- cgit v1.2.3