mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-10-11 20:58:16 +03:00
UserspaceEmulator: Fix execve messing up command lines with "--"
Emulator::virt$execve would construct command lines such as `/bin/UserspaceEmulator echo -- hello` instead of `/bin/UserspaceEmulator -- echo hello`, which naturally caused problems. This commit moves the "--" to the correct place.
This commit is contained in:
parent
2cda579b07
commit
d2f99c200f
Notes:
sideshowbarker
2024-07-17 20:32:32 +09:00
Author: https://github.com/Rummskartoffel Commit: https://github.com/SerenityOS/serenity/commit/d2f99c200fb Pull-request: https://github.com/SerenityOS/serenity/pull/12030 Reviewed-by: https://github.com/awesomekling
@ -1229,10 +1229,10 @@ int Emulator::virt$execve(FlatPtr params_addr)
|
||||
Vector<char*> envp;
|
||||
|
||||
argv.append(const_cast<char*>("/bin/UserspaceEmulator"));
|
||||
argv.append(const_cast<char*>(path.characters()));
|
||||
if (g_report_to_debug)
|
||||
argv.append(const_cast<char*>("--report-to-debug"));
|
||||
argv.append(const_cast<char*>("--"));
|
||||
argv.append(const_cast<char*>(path.characters()));
|
||||
|
||||
auto create_string_vector = [](auto& output_vector, auto& input_vector) {
|
||||
for (auto& string : input_vector)
|
||||
|
Loading…
Reference in New Issue
Block a user