From 85470f3e071bab495e642a437e41c9bb8922b790 Mon Sep 17 00:00:00 2001 From: Nick Chan Date: Tue, 26 May 2026 21:41:04 +0800 Subject: [PATCH] make sure to initialize section idx for 32 bit --- src/tools/patcher.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/patcher.c b/src/tools/patcher.c index 21294ae..cd7b21a 100644 --- a/src/tools/patcher.c +++ b/src/tools/patcher.c @@ -262,7 +262,7 @@ int parse_checkra1n32(void *c1) { Elf32_Shdr *sections = (Elf32_Shdr *)((uint8_t *)c1 + hdr->e_shoff); char *strings = (char *)c1 + sections[hdr->e_shstrndx].sh_offset; - Elf32_Half text_idx, kpf_idx; + Elf32_Half text_idx = 0, kpf_idx = 0; for (Elf32_Half i = 0; i < hdr->e_shnum; i++) { if (strcmp(&strings[sections[i].sh_name], ".text") == 0)