mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-14 03:25:50 +00:00
The C struct Palette.C declared colors as [265]Color.C, but the terminal palette is 256 colors (terminal.color.Palette = [256]RGB) and the C header ghostty_config_palette_s correctly uses colors[256]. The mismatch causes ghostty_config_get to write 265×3 = 795 bytes through a pointer sized for 256×3 = 768 bytes, producing a 27-byte buffer overflow. On macOS Release builds with stack protector enabled, this triggers __stack_chk_fail → SIGABRT on launch.