mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
54147: avoid buffer overflow with terminal sequences
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2025-12-16 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 54147: Src/Zle/termquery.c: avoid buffer overflow with
|
||||
terminal sequences
|
||||
|
||||
2025-11-30 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* Christopher Bock: 54117: update apt completion
|
||||
|
||||
@@ -703,10 +703,10 @@ collate_seq(int sindex, int dir)
|
||||
}
|
||||
if (enabled) {
|
||||
if (i)
|
||||
strucpy(&pos, editext[i].seq[sindex]);
|
||||
struncpy(&pos, editext[i].seq[sindex], seq + sizeof(seq) - pos - 1);
|
||||
else if ((bracket = getaparam("zle_bracketed_paste")) &&
|
||||
arrlen(bracket) == 2)
|
||||
strucpy(&pos, bracket[sindex]);
|
||||
struncpy(&pos, bracket[sindex], seq + sizeof(seq) - pos - 1);
|
||||
}
|
||||
}
|
||||
write_loop(SHTTY, seq, pos - seq);
|
||||
|
||||
Reference in New Issue
Block a user