From bf0a5577acbd9ec7c6a577601b97144b205840d7 Mon Sep 17 00:00:00 2001 From: Drew Marino Date: Fri, 15 Aug 2025 19:30:19 -0400 Subject: Support ^U for clearing password ^U is a fairly common key combo for clearing fields, this patch adds support for it. --- slock.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/slock.c b/slock.c index b5a9b04..b5d05b1 100644 --- a/slock.c +++ b/slock.c @@ -185,6 +185,9 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens, (len + num < sizeof(passwd))) { memcpy(passwd + len, buf, num); len += num; + } else if (buf[0] == '\025') { + explicit_bzero(&passwd, sizeof(passwd)); + len = 0; } break; } -- cgit v1.2.3-70-g09d2