diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2023-06-10 09:28:38 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2023-06-10 09:28:38 +0200 |
| commit | 1d584fead4e5df89d62f17521e17de21f81342c8 (patch) | |
| tree | df71e324cb5e04cdfe36e33b32bfa8df980af45b /src/wrapped | |
| parent | cc56ebbb35242cd41322dda98b629b2f044c3207 (diff) | |
| download | box64-1d584fead4e5df89d62f17521e17de21f81342c8.tar.gz box64-1d584fead4e5df89d62f17521e17de21f81342c8.zip | |
Fixed an issue in wrapped execv
Diffstat (limited to 'src/wrapped')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 2 |
1 files changed, 1 insertions, 1 deletions
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)); |