summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2025-03-21 01:55:10 +0100
committerAlexander Orzechowski <alex@ozal.ski>2025-03-21 17:31:38 -0400
commit9f70dd4ca6b0942b83202c9e81eebf0547bdccad (patch)
tree071164e94599ebe2f92a0841863196b18b9e54e8
parent66b6c7e5802dfe76fbba5daa58b3d517e477bbd0 (diff)
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.)
-rw-r--r--comm.c1
1 files changed, 1 insertions, 0 deletions
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");