From 1d584fead4e5df89d62f17521e17de21f81342c8 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Sat, 10 Jun 2023 09:28:38 +0200 Subject: Fixed an issue in wrapped execv --- src/wrapped/wrappedlibc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/wrapped') diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index d0792d3c..af756f79 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -1887,7 +1887,7 @@ EXPORT int32_t my_execv(x64emu_t* emu, const char* path, char* const argv[]) int n=skip_first; while(argv[n]) ++n; int toadd = script?2:1; - const char** newargv = (const char**)box_calloc(n+toadd+1, sizeof(char*)); + const char** newargv = (const char**)box_calloc(n+toadd+2, sizeof(char*)); newargv[0] = x86?emu->context->box86path:emu->context->box64path; if(script) newargv[1] = emu->context->bashpath; // script needs to be launched with bash memcpy(newargv+toadd, argv+skip_first, sizeof(char*)*(n+toadd)); -- cgit 1.4.1