about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorxctan <xctan@cirno.icu>2023-12-23 16:02:38 +0800
committerGitHub <noreply@github.com>2023-12-23 09:02:38 +0100
commit6163f98020239f10e26b69d4a53e01d29c7279ea (patch)
treed12f85712c087669a3c98ee03da2ef32afdfd4ef /src
parent316b2fc98abe75bef52e366acd67bd8ae8981d1f (diff)
downloadbox64-6163f98020239f10e26b69d4a53e01d29c7279ea.tar.gz
box64-6163f98020239f10e26b69d4a53e01d29c7279ea.zip
Cleanup some code (#1157)
* Fix the size of random bytes in the auxiliary vector (AT_RANDOM) to 16 bytes

* [ELFLOADER] Remove an unused statement
Diffstat (limited to 'src')
-rw-r--r--src/elfs/elfparser.c1
-rw-r--r--src/tools/box64stack.c2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/elfs/elfparser.c b/src/elfs/elfparser.c
index 994581f6..f9a3e844 100644
--- a/src/elfs/elfparser.c
+++ b/src/elfs/elfparser.c
@@ -438,7 +438,6 @@ int GetNeededVersionCnt(elfheader_t* h, const char* libname)
         Elf64_Verneed *ver = (Elf64_Verneed*)((uintptr_t)h->VerNeed + h->delta);
         while(ver) {
             char *filename = h->DynStr + ver->vn_file;
-            Elf64_Vernaux *aux = (Elf64_Vernaux*)((uintptr_t)ver + ver->vn_aux);
             if(!strcmp(filename, libname))
                 return ver->vn_cnt;
             ver = ver->vn_next?((Elf64_Verneed*)((uintptr_t)ver + ver->vn_next)):NULL;
diff --git a/src/tools/box64stack.c b/src/tools/box64stack.c
index 44596b98..d1c55d07 100644
--- a/src/tools/box64stack.c
+++ b/src/tools/box64stack.c
@@ -77,7 +77,7 @@ void SetupInitialStack(x64emu_t *emu)
     uintptr_t p_random = real_getauxval(25);
     if(!p_random) {
         for (int i=0; i<4; ++i)
-            Push64(emu, random());
+            Push32(emu, random());
         p_random = R_RSP;
     }
     // align