mirror of
https://git.suyu.dev/suyu/AppImageKit-checkrt.git
synced 2025-12-27 09:44:59 +01:00
Fixing memory access violation issues
This commit is contained in:
parent
71106b1794
commit
2b645a7f55
4 changed files with 13 additions and 27 deletions
|
|
@ -1,23 +1,14 @@
|
|||
--- a/AppRun.c
|
||||
+++ b/AppRun.c
|
||||
@@ -44,6 +44,8 @@
|
||||
|
||||
#define LINE_SIZE 255
|
||||
|
||||
+char *checkrt(char *usr_in_appdir);
|
||||
+
|
||||
int filter(const struct dirent *dir) {
|
||||
char *p = (char*) &dir->d_name;
|
||||
p = strrchr(p, '.');
|
||||
@@ -156,6 +158,7 @@
|
||||
@@ -156,6 +156,7 @@
|
||||
char *old_env;
|
||||
const int length = 2047;
|
||||
char new_env[8][length+1];
|
||||
+ char *optional = checkrt(usr_in_appdir);
|
||||
+ checkrt(usr_in_appdir);
|
||||
|
||||
/* https://docs.python.org/2/using/cmdline.html#envvar-PYTHONHOME */
|
||||
snprintf(new_env[0], length, "PYTHONHOME=%s/usr/", appdir);
|
||||
@@ -164,7 +167,7 @@
|
||||
@@ -164,7 +165,7 @@
|
||||
snprintf(new_env[1], length, "PATH=%s/usr/bin/:%s/usr/sbin/:%s/usr/games/:%s/bin/:%s/sbin/:%s", appdir, appdir, appdir, appdir, appdir, old_env);
|
||||
|
||||
old_env = getenv("LD_LIBRARY_PATH") ?: "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue