Merge pull request #2787 from ghostty-org/push-swmnnoxotlrw

termio: copy input command to avoid memory corruption
This commit is contained in:
Mitchell Hashimoto
2024-11-23 09:49:29 -08:00
committed by GitHub

View File

@ -78,7 +78,7 @@ pub fn setup(
try setupXdgDataDirs(alloc_arena, resource_dir, env);
break :shell .{
.shell = .elvish,
.command = command,
.command = try alloc_arena.dupe(u8, command),
};
}
@ -86,7 +86,7 @@ pub fn setup(
try setupXdgDataDirs(alloc_arena, resource_dir, env);
break :shell .{
.shell = .fish,
.command = command,
.command = try alloc_arena.dupe(u8, command),
};
}
@ -94,7 +94,7 @@ pub fn setup(
try setupZsh(resource_dir, env);
break :shell .{
.shell = .zsh,
.command = command,
.command = try alloc_arena.dupe(u8, command),
};
}