--- a/Admin/Linux/Isabelle.c Tue Jan 26 19:55:11 2021 +0100
+++ b/Admin/Linux/Isabelle.c Tue Jan 26 20:06:38 2021 +0100
@@ -24,18 +24,19 @@
int i = 0;
dcmd = strdup(argv[0]);
+ if (dcmd == NULL) fail("Failed to allocate memory");
+
dname = dirname(dcmd);
cmd_line = malloc(sizeof(char *) * (argc + 1));
if (cmd_line == NULL) fail("Failed to allocate memory");
- cmd = cmd_line[0];
cmd = malloc(strlen(dname) + strlen("/lib/scripts/Isabelle_app") + 1);
if (cmd == NULL) fail("Failed to allocate memory");
sprintf(cmd, "%s/lib/scripts/Isabelle_app", dname);
+ cmd_line[0] = cmd;
for (i = 1; i < argc; i++) cmd_line[i] = argv[i];
-
cmd_line[argc] = NULL;
execvp(cmd, cmd_line);