diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-04-10 03:44:33 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-04-10 03:44:33 +0000 |
| commit | 9287946b3672d21fabd70ba4aeebc5a63e6259f9 (patch) | |
| tree | a7a49e57cc4bfbee4b3c3924b0322379799411fb | |
| parent | themes: add dracula-iterm (diff) | |
dcs: DECRQSS: fix off-by-one when checking for space in the DCS buffer
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | dcs.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index b0c62d36..f555d472 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,8 @@ * When closing the window, send `SIGHUP` to the client application, before sending `SIGTERM`. The signal sequence is now `SIGHUP`, wait, `SIGTERM`, wait `SIGKILL`. +* Crash when receiving a `DECRQSS` request with more than 2 bytes in + the `q` parameter. [1666]: https://codeberg.org/dnkl/foot/issues/1666 @@ -239,7 +239,7 @@ decrqss_put(struct terminal *term, uint8_t c) return; struct vt *vt = &term->vt; - if (vt->dcs.idx > 2) + if (vt->dcs.idx >= 2) return; vt->dcs.data[vt->dcs.idx++] = c; } |
