:: commit 83f22ae441ca5ffb5f45c25e4297864884414435

Mintsuki <mintsuki@protonmail.com> — 2026-02-08 16:21

parents: 0b677c502a

host/limine: Fix signature search missing matches after partial prefix overlap

diff --git a/host/limine.c b/host/limine.c
index 6ae3104b..f2003d10 100644
--- a/host/limine.c
+++ b/host/limine.c
@@ -1279,7 +1279,10 @@ static int enroll_config(int argc, char *argv[]) {
     const char *config_b2sum_sign = CONFIG_B2SUM_SIGNATURE;
     for (size_t i = 0; i < bootloader_size - min_size + 1; i++) {
         if (bootloader[i] != config_b2sum_sign[checked_count]) {
-            checked_count = 0;
+            if (checked_count > 0) {
+                checked_count = 0;
+                i--; // re-check current byte against start of signature
+            }
             continue;
         }
 
tab: 248 wrap: offon