<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mirrors/foot.git, branch sixel-heap-buffer-overflow</title>
<subtitle>A fast, lightweight and minimalistic Wayland terminal emulator</subtitle>
<id>https://git.0x0f.dev/mirrors/foot.git/atom?h=sixel-heap-buffer-overflow</id>
<link rel='self' href='https://git.0x0f.dev/mirrors/foot.git/atom?h=sixel-heap-buffer-overflow'/>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/'/>
<updated>2026-05-22T09:50:42Z</updated>
<entry>
<title>sixel: clamp max width/height in 'CSI ? 2 ; 3 ; W ; H S'</title>
<updated>2026-05-22T09:50:42Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-22T09:18:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=92187d2e4e1980b31ff2aa174d7f917d0945e175'/>
<id>urn:sha1:92187d2e4e1980b31ff2aa174d7f917d0945e175</id>
<content type='text'>
This ensures the user cannot raise the maximum sixel size, where
width*height cannot be represented as an integer.

Note, we should consider moving all sixel width/height variables from
int to size_t. But, since it doesn't make any sense with overly large
sixel images, clamping the max width/height is enough. Add a
static_assert() that checks SIXEL_MAX_WIDTH * SIXEL_MAX_HEIGHT doesn't
overflow.

Closes #2343
</content>
</entry>
<entry>
<title>selection: do not copy empty text</title>
<updated>2026-05-22T09:49:46Z</updated>
<author>
<name>CismonX</name>
<email>admin@cismon.net</email>
</author>
<published>2026-05-20T18:38:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=4bf60d0fbcad533c5131288617caae67342c1065'/>
<id>urn:sha1:4bf60d0fbcad533c5131288617caae67342c1065</id>
<content type='text'>
Copy-on-select (configured with 'selection-target') may accidentally
clear the clipboard, if the user drags the mouse a little bit when
clicking inside a terminal window.

Now we only copy if there is actual text being selected.

Closes #2327
</content>
</entry>
<entry>
<title>csi: DECCRA: clamp and verify destination rectangle coordinates</title>
<updated>2026-05-22T09:39:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-22T09:39:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=b18d8aa2f165a3b07c28f43de6812e057ba3233e'/>
<id>urn:sha1:b18d8aa2f165a3b07c28f43de6812e057ba3233e</id>
<content type='text'>
dst_right was already being clamped, but not dst_left.

In addition to that, reject the sequence if dst_left &gt; dst_right, or
dst_bottom &gt; dst_top.

This is already being done for the source rectangle, in
params_to_rectangular_area().

Closes #2352
</content>
</entry>
<entry>
<title>uri-parse: fix out-of-bounds read with malformed %-encoded content</title>
<updated>2026-05-22T09:00:48Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-22T08:59:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2eaa7beba1f35b31019a992de35be8a54b9ac028'/>
<id>urn:sha1:2eaa7beba1f35b31019a992de35be8a54b9ac028</id>
<content type='text'>
If the input URI ends with a trailing '%' (or a trailing '%N'), we
read outside the provided buffer.

On NULL terminated input, this happened to work out since we'd
correctly detect an invalid %-sequence as soon as we read the NULL
terminator.

On input that is not NULL terminated, we're out of luck.

This patch fixes this by also checking we have enough input left to
even _try_ to read the %-digits.

Also add unit tests for this particular case.

Closes #2353
</content>
</entry>
<entry>
<title>uri-parse: add a bunch of unit tests</title>
<updated>2026-05-22T08:49:22Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-22T08:49:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=5335cec3228dab421b2abba4f178125d88ad2fbe'/>
<id>urn:sha1:5335cec3228dab421b2abba4f178125d88ad2fbe</id>
<content type='text'>
</content>
</entry>
<entry>
<title>project: add .clangd, where we set -Wno-c2y-extensions</title>
<updated>2026-05-17T13:03:56Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-17T13:03:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=f35e60577fde44a7360415448a380702d2ac0ae4'/>
<id>urn:sha1:f35e60577fde44a7360415448a380702d2ac0ae4</id>
<content type='text'>
We make use of __COUNTER__, which recent versions of clang emit a
warning for (unless you compile with -std=c2y).

Our meson.build already handles this for the actual build, but if your
build is using gcc, -Wno-c2y-extensions isn't added to the build
rules (since gcc doesn't support the flag).
</content>
</entry>
<entry>
<title>changelog: add new 'unreleased' section</title>
<updated>2026-05-15T06:29:07Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-15T06:29:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2d11b36a24d7bdd056fac48fb8d5e8f274a1dcf0'/>
<id>urn:sha1:2d11b36a24d7bdd056fac48fb8d5e8f274a1dcf0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge branch 'releases/1.27'</title>
<updated>2026-05-15T06:27:39Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-15T06:27:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ab1660ef62d7e00edfd97029dfa54fe44675f247'/>
<id>urn:sha1:ab1660ef62d7e00edfd97029dfa54fe44675f247</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: bump version to 1.27.0</title>
<updated>2026-05-15T06:26:04Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-15T06:26:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=de998602dbc00c8862a6823d553cbb1df91c676d'/>
<id>urn:sha1:de998602dbc00c8862a6823d553cbb1df91c676d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>changelog: prepare for 1.27.0</title>
<updated>2026-05-15T06:25:35Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-15T06:25:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a94e1dda2186f6cdbe2b4fd9d615c8327c588cec'/>
<id>urn:sha1:a94e1dda2186f6cdbe2b4fd9d615c8327c588cec</id>
<content type='text'>
</content>
</entry>
<entry>
<title>osc: kitty notifications: increase query reply buffer size</title>
<updated>2026-05-14T14:03:16Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-14T10:41:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ab6ffd1344d1d19f4c7275fcb3c1429a11881381'/>
<id>urn:sha1:ab6ffd1344d1d19f4c7275fcb3c1429a11881381</id>
<content type='text'>
When we initially implemented the kitty notification protocol, 128
bytes was enough.

Since then, the protocol has grown, and 128 bytes is no longer enough,
resulting in a crash when you try to query the protocol:

    printf "\e]99;i=123:p=?;\e\\"

Results in

    #0 0x7fe4fad3dcde in __sanitizer_print_stack_trace (/usr/lib/libasan.so.8+0x13dcde) (BuildId: 38f5643355445a477f07ffa9b6a83a55c87415a0)
    #1 0x561ec61454e8 in print_stack_trace ../../debug.c:20
    #2 0x561ec6145550 in fatal_error ../../debug.c:28
    #3 0x561ec61462d0 in xvsnprintf ../../xsnprintf.c:42
    #4 0x561ec614640a in xsnprintf ../../xsnprintf.c:52
    #5 0x561ec6131fe6 in kitty_notification ../../osc.c:765
    #6 0x561ec6139fec in osc_dispatch ../../osc.c:1511
    #7 0x561ec60fcac8 in action_osc_end ../../vt.c:614
    #8 0x561ec60fe6bb in state_osc_string_switch ../../vt.c:924
    #9 0x561ec60ff437 in vt_from_slave ../../vt.c:1115
    #10 0x561ec6078748 in fdm_ptmx ../../terminal.c:297
    #11 0x561ec5ee6ed0 in fdm_poll ../../fdm.c:483
    #12 0x561ec5f344d3 in main ../../main.c:676
    #13 0x7fe4f9e2777d  (/usr/lib/libc.so.6+0x2777d) (BuildId: 674f3ebbcb651fbc7d1189cb300acfd7d007849a)
    #14 0x7fe4f9e278bb in __libc_start_main (/usr/lib/libc.so.6+0x278bb) (BuildId: 674f3ebbcb651fbc7d1189cb300acfd7d007849a)
    #15 0x561ec5e77a14 in _start (/home/daniel/src/foot/bld/debug/foot+0x4b8a14) (BuildId: 9fca511350f3745edd3546ff800a763c1957e673)

Closes #2335
</content>
</entry>
<entry>
<title>render: cursor: improve handling of fg == bg</title>
<updated>2026-05-12T14:40:24Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-11T12:14:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=cc6b29fe3a98a1575af4eb6644504a2fff619b5c'/>
<id>urn:sha1:cc6b29fe3a98a1575af4eb6644504a2fff619b5c</id>
<content type='text'>
We already detect if the final cursor colors (foreground/background)
are identical.

If they were, we replaced them with the default fg/bg.

Unfortunately, this can still result in an invisible cursor. For
example, if the current cell's default bg matches the current cell's
fg.

Instead, update the colors in two steps:

1. First, use the provided (cell's) fg/bg
2. If they too match, invert the cursor color

This should ensure the cursor is always visible

Closes #2323
</content>
</entry>
<entry>
<title>search/url/unicode-mode: set last-shortcut-sym</title>
<updated>2026-05-12T14:39:17Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-11T07:16:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=a2476536f9d28d8f02d8477822a1425df16ac28d'/>
<id>urn:sha1:a2476536f9d28d8f02d8477822a1425df16ac28d</id>
<content type='text'>
When processing shortcuts, set seat-&gt;kbd.last_shortcut_sym. This
ensures the corresponding release event is ignored in the main mode,
if the shortcut triggered a mode exit.

For example, pressing Return in search mode would exit search mode,
and then immediately reset the search match, if the kitty keyboard
protocol mode with release events were enabled.
</content>
</entry>
<entry>
<title>uri: check 'scheme' is non-null before de-referencing it</title>
<updated>2026-05-11T11:37:53Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-11T11:37:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=43566b655fee76947e0166d74a9dda4c03be26e6'/>
<id>urn:sha1:43566b655fee76947e0166d74a9dda4c03be26e6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>meson: add -Dfanalyzer=false|true</title>
<updated>2026-05-11T11:04:29Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-05-11T11:01:13Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=98c84e632676f3e8515789bacee81d3ed0888f3a'/>
<id>urn:sha1:98c84e632676f3e8515789bacee81d3ed0888f3a</id>
<content type='text'>
When enabled, compile with -fanalyzer
</content>
</entry>
<entry>
<title>keymap: no reason keypad keys shouldn't map shift</title>
<updated>2026-04-17T11:38:43Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-04-17T11:34:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=6183d1b767480b0a96db967e0e1e268317966ce6'/>
<id>urn:sha1:6183d1b767480b0a96db967e0e1e268317966ce6</id>
<content type='text'>
I'm guessing, but I'm not sure, that when I initially implemented
this, XTerm ignored shift in keypad escapes.

Testing again, it doesn't. And regardless of what XTerm does, I don't
really see any reason to exclude shift from keypad escapes.

Closes #2324
</content>
</entry>
<entry>
<title>config: add url.style=none|single|double|curly|dotted|dashed</title>
<updated>2026-04-06T13:47:26Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-04-06T13:47:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=2c454a71f14da912f5623336b93ec8f48f2d1cf9'/>
<id>urn:sha1:2c454a71f14da912f5623336b93ec8f48f2d1cf9</id>
<content type='text'>
This option allows you to configure which underline style to use with
URLs.

The default is dotted. Since before this patch, URL underlines were
always plain underlines, this means the default URL underline style
has changed, from single to dotted.

Closes #2302
</content>
</entry>
<entry>
<title>wayland: shm: fix debug builds when LOG_ENABLE_DBG == 0</title>
<updated>2026-04-06T13:25:08Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-04-06T13:25:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=ecf3b864e461bf6bf5033ac794cc6109013cd816'/>
<id>urn:sha1:ecf3b864e461bf6bf5033ac794cc6109013cd816</id>
<content type='text'>
</content>
</entry>
<entry>
<title>wayland: shm: included decoded fourcc name when logging shm formats</title>
<updated>2026-04-06T13:19:59Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-04-06T13:19:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=48aa5decef4db82092617e720b758a3a6f956bf7'/>
<id>urn:sha1:48aa5decef4db82092617e720b758a3a6f956bf7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>input: no extra key processing in alternate input modes</title>
<updated>2026-04-06T09:10:38Z</updated>
<author>
<name>Daniel Eklöf</name>
<email>daniel@ekloef.se</email>
</author>
<published>2026-04-06T08:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0x0f.dev/mirrors/foot.git/commit/?id=89d6ff10fa816f11c1fa20368e4cc3464549955e'/>
<id>urn:sha1:89d6ff10fa816f11c1fa20368e4cc3464549955e</id>
<content type='text'>
In 3a2eb80d83d59d194a3d07da227431c634892ff5, we fixed an issue where
key *releases* triggered a selection reset, and viewport reset.

The same issue still exists in other input modes (unicode, search and
url mode); if the kitty keyboard protocol has been enabled, with
release events, any key press directed to e.g. search input handling,
will was not remembered, and the corresponding release event generated
a kitty keyboard event to the terminal application, and reset the
viewport and selection.

This means, for example, that scrollback search was unusable.

Fix by *never* doing any further (generic) key processing if an
alternate input mode is active.

Closes #2316
</content>
</entry>
</feed>
