Skip to content

Commit

Permalink
kernel: fix potential dead loop
Browse files Browse the repository at this point in the history
Co-Authored-by: qwerty472123
  • Loading branch information
tiann committed Mar 30, 2024
1 parent 942866d commit 4a73672
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kernel/apk_sign.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4a73672

Please sign in to comment.