Introduction
Introduction Statistics Contact Development Disclaimer Help
end{pw,sp}ent() can only be called after get{pw,sp}ent() - slock - simple X dis…
git clone git://git.suckless.org/slock
Log
Files
Refs
README
LICENSE
---
commit 4339b507af01421e2deab63ca9ac3c5bdae5f4cc
parent 8745098fa440ef3bf1d8e173dcd91514b34600c6
Author: sin <[email protected]>
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 …
}
- 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…
- endspent();
rval = sp->sp_pwdp;
}
#endif
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.