mirror of
https://git.suyu.dev/suyu/AppImageKit-checkrt.git
synced 2026-01-06 06:28:05 +01:00
explicitly set terminating nul byte
This commit is contained in:
parent
caf91e2408
commit
e96f4b3436
1 changed files with 3 additions and 1 deletions
|
|
@ -103,8 +103,10 @@ void checkrt(char *usr_in_appdir)
|
||||||
bundle_gcc = 1;
|
bundle_gcc = 1;
|
||||||
|
|
||||||
if (bundle_cxx == 1 || bundle_gcc == 1) {
|
if (bundle_cxx == 1 || bundle_gcc == 1) {
|
||||||
optional_ld_preload = malloc(strlen("LD_PRELOAD=") + strlen(EXEC_SO) + 1 + len);
|
len = strlen(EXEC_SO) + 12 + len;
|
||||||
|
optional_ld_preload = malloc(len);
|
||||||
sprintf(optional_ld_preload, "LD_PRELOAD=%s/" EXEC_SO, usr_in_appdir);
|
sprintf(optional_ld_preload, "LD_PRELOAD=%s/" EXEC_SO, usr_in_appdir);
|
||||||
|
optional_ld_preload[len] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bundle_cxx == 1 && bundle_gcc == 0) {
|
if (bundle_cxx == 1 && bundle_gcc == 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue