Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b04f4d0810 | ||
|
|
55d985a354 | ||
|
|
3791a996e2 | ||
|
|
bf0a5577ac |
No files matched your search
@@ -1,5 +1,5 @@
|
||||
# slock version
|
||||
VERSION = 1.6
|
||||
VERSION = 1.7
|
||||
|
||||
# Customize below to fit your system
|
||||
|
||||
|
||||
@@ -181,10 +181,13 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
|
||||
passwd[--len] = '\0';
|
||||
break;
|
||||
default:
|
||||
if (num && !iscntrl((int)buf[0]) &&
|
||||
if (num && !iscntrl((unsigned char)buf[0]) &&
|
||||
(len + num < sizeof(passwd))) {
|
||||
memcpy(passwd + len, buf, num);
|
||||
len += num;
|
||||
} else if (buf[0] == '\025') { /* ctrl-u clears input */
|
||||
explicit_bzero(&passwd, sizeof(passwd));
|
||||
len = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user