diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-08-15 14:00:02 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-08-15 14:00:02 +0200 |
| commit | 65b1b9256ad824b70484ce96d984fc8810aaa024 (patch) | |
| tree | cf6b810dc60ac8ae3e242244827cc2cbe41f20b6 /src | |
| parent | 7866f116dff8cc83d7b09f681c98722c6cd7c5a8 (diff) | |
| download | box64-65b1b9256ad824b70484ce96d984fc8810aaa024.tar.gz box64-65b1b9256ad824b70484ce96d984fc8810aaa024.zip | |
Fixed falsly detection of needed memory hack
Diffstat (limited to 'src')
| -rw-r--r-- | src/mallochook.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mallochook.c b/src/mallochook.c index 4c636dd4..f63a85bd 100644 --- a/src/mallochook.c +++ b/src/mallochook.c @@ -779,7 +779,7 @@ void checkHookedSymbols(elfheader_t* h) for (size_t i=0; i<h->numSymTab; ++i) { int type = ELF64_ST_TYPE(h->SymTab[i].st_info); int sz = ELF64_ST_TYPE(h->SymTab[i].st_size); - if(type==STT_FUNC && sz) { + if((type==STT_FUNC) && sz && (h->SymTab[i].st_shndx!=0 && h->SymTab[i].st_shndx<=65521)) { const char * symname = h->StrTab+h->SymTab[i].st_name; #define GO(A, B) if(!strcmp(symname, #A)) ++hooked; else if(!strcmp(symname, "__libc_" #A)) ++hooked; #define GO2(A, B) |