diff options
| -rw-r--r-- | CHANGELOG.md | 2 | ||||
| -rw-r--r-- | sixel.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index f919972d..87e6440f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,8 @@ * Crash when `foot.ini` contains an invalid section name (https://codeberg.org/dnkl/foot/issues/159). * Background opacity when in _reverse video_ mode. +* Crash when writing a sixel image that extends outside the terminal's + right margin (https://codeberg.org/dnkl/foot/issues/151). ### Security @@ -482,7 +482,8 @@ sixel_unhook(struct terminal *term) }; sixel_overwrite_by_rectangle( - term, cursor->row, image.pos.col, image.rows, image.cols); + term, cursor->row, image.pos.col, + image.rows, min(image.cols, term->cols - image.pos.col)); LOG_DBG("generating %dx%d pixman image at %d-%d", image.width, image.height, |
