slock
simple X display locker utility
git clone https://9o.is/git/slock.git
commit cdee1b5885311f5281601aa3faa8145ea7160295
parent 2c492d4623819cedd1347ca762f299db5e940cfa
Author: sin <sin@2f30.org>
Date: Fri, 7 Nov 2014 13:20:13 +0000
end{pw,sp}ent() can only be called after get{pw,sp}ent()
Calling them unconditionally can result in memory corruption.
Diffstat:
| M | slock.c | | | 2 | -- |
1 file changed, 0 insertions(+), 2 deletions(-)
diff --git a/slock.c b/slock.c @@ -73,7 +73,6 @@ getpw(void) { /* only run as root */ else die("slock: cannot retrieve password entry (make sure to suid or sgid slock)\n"); } - endpwent(); rval = pw->pw_passwd; #if HAVE_SHADOW_H @@ -82,7 +81,6 @@ getpw(void) { /* only run as root */ sp = getspnam(getenv("USER")); if(!sp) die("slock: cannot retrieve shadow entry (make sure to suid or sgid slock)\n"); - endspent(); rval = sp->sp_pwdp; } #endif