Support ^U for clearing password - slock - simple X display locker utility
 (HTM) git clone git://git.suckless.org/slock
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit bf0a5577acbd9ec7c6a577601b97144b205840d7
 (DIR) parent e3fb34364ed2c53b21edde07ac17560a601783a9
 (HTM) Author: Drew Marino <drewmarino25@gmail.com>
       Date:   Fri, 15 Aug 2025 19:30:19 -0400
       
       Support ^U for clearing password
       
       ^U is a fairly common key combo for clearing fields, this patch adds
       support for it.
       
       Diffstat:
         M slock.c                             |       3 +++
       
       1 file changed, 3 insertions(+), 0 deletions(-)
       ---
 (DIR) diff --git 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;
                                }