mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-20 10:31:16 -03:00
Fix panic parsing CSIs
The array lengths were transposed, so attempting to parse a CSI with more than 4 parameters would go out of bounds and panic.
This commit is contained in:
@@ -806,7 +806,7 @@ fn parse_codepoint(
|
||||
|
||||
fn parse_csi(&mut self, buffer: &mut Vec<u8>) -> Option<Key> {
|
||||
let mut next_char = |zelf: &mut Self| zelf.try_readb(buffer).unwrap_or(0xff);
|
||||
let mut params = [[0_u32; 16]; 4];
|
||||
let mut params = [[0_u32; 4]; 16];
|
||||
let mut c = next_char(self);
|
||||
let private_mode;
|
||||
if matches!(c, b'?' | b'<' | b'=' | b'>') {
|
||||
|
||||
Reference in New Issue
Block a user