From 9f70dd4ca6b0942b83202c9e81eebf0547bdccad Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Fri, 21 Mar 2025 01:55:10 +0100 Subject: comm: assert that password size is positive If it's not, we may be reading before the buffer bounds later. (The password buffer size is aligned to the page size.) --- comm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/comm.c b/comm.c index 16a4da9..4955b1d 100644 --- a/comm.c +++ b/comm.c @@ -59,6 +59,7 @@ ssize_t read_comm_request(char **buf_ptr) { if (n <= 0) { return n; } + assert(size > 0); swaylock_log(LOG_DEBUG, "received pw check request"); -- cgit v1.2.3