slight bounds checking

This commit is contained in:
nova
2026-07-26 16:27:29 +02:00
parent 06c00a0924
commit 6d1c9c95ac
+6
View File
@@ -60,6 +60,9 @@ void user_interactions() {
memset(input, 0, INPUT_BUFFER_SIZE);
input_pass = 0;
}
if (input_pass >= INPUT_BUFFER_SIZE) {
input_pass = INPUT_BUFFER_SIZE - 1;
}
}
@@ -158,6 +161,9 @@ char read_string_loop(WINDOW *win, char *buffer, char *nullable_return_char, uns
}
if (*pass >= INPUT_BUFFER_SIZE) {
*pass = INPUT_BUFFER_SIZE - 1;
}
return 0;
}