diff --git a/kernel/apk_sign.c b/kernel/apk_sign.c index 7e11f9f6dfb2..c2a5562367c3 100644 --- a/kernel/apk_sign.c +++ b/kernel/apk_sign.c @@ -229,7 +229,8 @@ static __always_inline bool check_v2_signature(char *path, goto clean; } - for (;;) { + int loop_count = 0; + while (loop_count++ < 10) { uint32_t id; uint32_t offset; ksu_kernel_read_compat(fp, &size8, 0x8,