mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-06-13 14:33:17 -04:00
osc: kitty text-size: bail out if text is zero-length
This fixes a crash further down, where we try to lookup an existing compose sequence. Closes #2364
This commit is contained in:
parent
75e201608b
commit
8b047852f3
2 changed files with 6 additions and 0 deletions
|
|
@ -102,6 +102,8 @@
|
|||
([#2360][2360]).
|
||||
* Sixel: crash when using a shared palette and gamma-correct blending
|
||||
has been enabled, or foot is using 10-bit surface ([#2370][2370]).
|
||||
* Kitty text-size protocol: fix crash when text is zero-length
|
||||
([#2364][2364]).
|
||||
|
||||
[2353]: https://codeberg.org/dnkl/foot/issues/2353
|
||||
[2352]: https://codeberg.org/dnkl/foot/issues/2352
|
||||
|
|
@ -109,6 +111,7 @@
|
|||
[2379]: https://codeberg.org/dnkl/foot/issues/2379
|
||||
[2360]: https://codeberg.org/dnkl/foot/issues/2360
|
||||
[2370]: https://codeberg.org/dnkl/foot/issues/2370
|
||||
[2364]: https://codeberg.org/dnkl/foot/issues/2364
|
||||
|
||||
|
||||
### Security
|
||||
|
|
|
|||
3
osc.c
3
osc.c
|
|
@ -1149,6 +1149,9 @@ kitty_text_size(struct terminal *term, char *string)
|
|||
*text = '\0';
|
||||
text++;
|
||||
|
||||
if (text[0] == '\0')
|
||||
return;
|
||||
|
||||
char32_t *wchars = ambstoc32(text);
|
||||
if (wchars == NULL)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue