This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch tymux-10-quiet-head
in repository terminology.

View the commit online.

commit 594396abf2474b482e38e2589c8038b46b5d0208
Author: Boris Faure <[email protected]>
AuthorDate: Sun Nov 8 12:15:56 2026 +0000

    termptyops: bound the ASCII scan to the room left on the row
    
    Past the plain ASCII prefix the parser found, each run is scanned again
    from the cursor, and the scan went to the end of the codepoints handed
    over, though at most the room left on the row is written. After a
    non-ASCII character, an ASCII run of n codepoints in one read cost
    O(n^2 / width): seconds for the 256 KiB a burst of reads can deliver,
    as AFL found with one 0x88 byte followed by megabytes of '|'.
---
 src/bin/termptyops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/termptyops.c b/src/bin/termptyops.c
index 747de6da..22c70888 100644
--- a/src/bin/termptyops.c
+++ b/src/bin/termptyops.c
@@ -409,7 +409,7 @@ termpty_text_append_known_ascii(Termpty *ty, const Eina_Unicode *codepoints,
                   size_t run = ((size_t)i < plain_ascii_len)
                      ? plain_ascii_len - (size_t)i
                      : simd_scan_plain_ascii_u32(codepoints + i,
-                                                 (size_t)(len - i));
+                                                 (size_t)MIN(len - i, avail));
 
                   if (run > (size_t)avail) run = (size_t)avail;
                   if (run >= 2)

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to