about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-04-18 22:50:52 +0200
committerptitSeb <sebastien.chev@gmail.com>2022-04-18 22:50:52 +0200
commit2a4c1d0aac5cb0c196c0bbaea71a40a5b640dc86 (patch)
treea246ec0681653402c7219af9e9f7467b0419b329 /src
parent6c4b88123a26a0fc723b9fdbd03ce0cf4b084b3f (diff)
downloadbox64-2a4c1d0aac5cb0c196c0bbaea71a40a5b640dc86.tar.gz
box64-2a4c1d0aac5cb0c196c0bbaea71a40a5b640dc86.zip
Do not use alloca here, it's not temporary storage
Diffstat (limited to 'src')
-rwxr-xr-xsrc/librarian/librarian.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/librarian/librarian.c b/src/librarian/librarian.c
index 02a02ec6..fdb6fd41 100755
--- a/src/librarian/librarian.c
+++ b/src/librarian/librarian.c
@@ -344,8 +344,7 @@ int AddNeededLib(lib_t* maplib, needed_libs_t* neededlibs, library_t* deplib, in
 {
     box64_mapclean = 0;
     if(!neededlibs) {
-        neededlibs = alloca(sizeof(needed_libs_t));
-        memset(neededlibs, 0, sizeof(needed_libs_t));
+        neededlibs = calloc(1, sizeof(needed_libs_t));
     }
     int idx = neededlibs->size;
     // Add libs and symbol