diff options
| author | Oliver Kiddle <opk@zsh.org> | 2025-12-16 01:13:40 +0100 |
|---|---|---|
| committer | Oliver Kiddle <opk@zsh.org> | 2025-12-16 01:13:40 +0100 |
| commit | af47b221671839bc772fa3d133a565556711847c (patch) | |
| tree | 30d73581b18aa2285c0592f154cb6168e6b6371e /Src/Zle | |
| parent | 54117: update apt completion (diff) | |
| download | zsh-af47b221671839bc772fa3d133a565556711847c.tar zsh-af47b221671839bc772fa3d133a565556711847c.tar.gz zsh-af47b221671839bc772fa3d133a565556711847c.tar.bz2 zsh-af47b221671839bc772fa3d133a565556711847c.tar.lz zsh-af47b221671839bc772fa3d133a565556711847c.tar.xz zsh-af47b221671839bc772fa3d133a565556711847c.tar.zst zsh-af47b221671839bc772fa3d133a565556711847c.zip | |
54147: avoid buffer overflow with terminal sequences
Diffstat (limited to 'Src/Zle')
| -rw-r--r-- | Src/Zle/termquery.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Zle/termquery.c b/Src/Zle/termquery.c index a2d617db8..c8f5385d9 100644 --- a/Src/Zle/termquery.c +++ b/Src/Zle/termquery.c @@ -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); |
