1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-09-29 17:45:55 -04:00

Prevent the AppImage internal name from leaking out

This commit is contained in:
John Zaitseff 2021-01-14 12:07:01 +11:00
parent 82d460fe31
commit aa0e539540

View File

@ -53,6 +53,8 @@ wchar_t *mon_thousands_sep; // Locale's monetary thousands separator
* Module-specific constants and macros *
************************************************************************/
#define APPIMAGE_NAME "AppRun.wrapped"
#define DIRSEP "/" // Directory separator
#define HIDDEN_PATH "." // Hidden file start char
#define XDG_DATA_DEFAULT ".local" DIRSEP "share"
@ -325,6 +327,12 @@ void init_program_name (const char *argv0)
} else {
program_name = xstrdup(argv0);
}
// Prevent the AppImage internal name from leaking out
if (strcmp(program_name, APPIMAGE_NAME) == 0) {
free((void *) program_name);
program_name = PACKAGE;
}
}
}