=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/screen-write.c,v retrieving revision 1.223 retrieving revision 1.224 diff -c -r1.223 -r1.224 *** src/usr.bin/tmux/screen-write.c 2023/10/23 08:12:00 1.223 --- src/usr.bin/tmux/screen-write.c 2023/10/30 16:05:30 1.224 *************** *** 1,4 **** ! /* $OpenBSD: screen-write.c,v 1.223 2023/10/23 08:12:00 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: screen-write.c,v 1.224 2023/10/30 16:05:30 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 2024,2029 **** --- 2024,2033 ---- } else if (!utf8_has_zwj(&last.data)) return (0); } + + /* Check if this combined character would be too long. */ + if (last.data.size + ud->size > sizeof last.data.data) + return (0); /* Combining; flush any pending output. */ screen_write_collect_flush(ctx, 0, __func__);