mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 09:47:01 +02:00
make sure to initialize section idx for 32 bit
This commit is contained in:
1 parent
0d4a97571a
commit
85470f3e07
1 file changed
+1
-1
+1
-1
@@ -262,7 +262,7 @@ int parse_checkra1n32(void *c1) {
|
|||||||
Elf32_Shdr *sections = (Elf32_Shdr *)((uint8_t *)c1 + hdr->e_shoff);
|
Elf32_Shdr *sections = (Elf32_Shdr *)((uint8_t *)c1 + hdr->e_shoff);
|
||||||
char *strings = (char *)c1 + sections[hdr->e_shstrndx].sh_offset;
|
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++) {
|
for (Elf32_Half i = 0; i < hdr->e_shnum; i++) {
|
||||||
if (strcmp(&strings[sections[i].sh_name], ".text") == 0)
|
if (strcmp(&strings[sections[i].sh_name], ".text") == 0)
|
||||||
|
|||||||
Reference in new issue
Block a user