mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
Fix incorrect memory access
This commit is contained in:
parent
1bf12c9685
commit
0629ea0a98
@ -634,7 +634,10 @@ void Application::AttachDebugger(const String& filename, bool interactive)
|
||||
my_pid_str,
|
||||
NULL
|
||||
};
|
||||
|
||||
argv = const_cast<char **>(uargv);
|
||||
|
||||
(void) execvp(argv[0], argv);
|
||||
} else {
|
||||
const char *uargv[] = {
|
||||
"gdb",
|
||||
@ -649,10 +652,12 @@ void Application::AttachDebugger(const String& filename, bool interactive)
|
||||
"quit",
|
||||
NULL
|
||||
};
|
||||
|
||||
argv = const_cast<char **>(uargv);
|
||||
|
||||
(void) execvp(argv[0], argv);
|
||||
}
|
||||
|
||||
(void)execvp(argv[0], argv);
|
||||
perror("Failed to launch GDB");
|
||||
free(my_pid_str);
|
||||
_exit(0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user