mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-24 09:05:48 -04:00
sixel: overwrite-by-rectangle expects ‘width’ to not exceed screen
This fixes a crash when the emitted sixel extends beyond the right margin. The crash only happens when there are other sixel images already emitted. Fixes part of #151
This commit is contained in:
parent
7e026ba119
commit
96405c2ca9
2 changed files with 4 additions and 1 deletions
|
|
@ -61,6 +61,8 @@
|
||||||
* Crash when `foot.ini` contains an invalid section name
|
* Crash when `foot.ini` contains an invalid section name
|
||||||
(https://codeberg.org/dnkl/foot/issues/159).
|
(https://codeberg.org/dnkl/foot/issues/159).
|
||||||
* Background opacity when in _reverse video_ mode.
|
* 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
|
### Security
|
||||||
|
|
|
||||||
3
sixel.c
3
sixel.c
|
|
@ -482,7 +482,8 @@ sixel_unhook(struct terminal *term)
|
||||||
};
|
};
|
||||||
|
|
||||||
sixel_overwrite_by_rectangle(
|
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",
|
LOG_DBG("generating %dx%d pixman image at %d-%d",
|
||||||
image.width, image.height,
|
image.width, image.height,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue