=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/format-draw.c,v retrieving revision 1.26 retrieving revision 1.27 diff -c -r1.26 -r1.27 *** src/usr.bin/tmux/format-draw.c 2022/02/22 11:07:25 1.26 --- src/usr.bin/tmux/format-draw.c 2023/08/07 10:04:29 1.27 *************** *** 1,4 **** ! /* $OpenBSD: format-draw.c,v 1.26 2022/02/22 11:07:25 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: format-draw.c,v 1.27 2023/08/07 10:04:29 nicm Exp $ */ /* * Copyright (c) 2019 Nicholas Marriott *************** *** 1083,1089 **** struct utf8_data ud; enum utf8_state more; ! out = copy = xcalloc(1, strlen(expanded) + 1); while (*cp != '\0') { if (width >= limit) break; --- 1083,1089 ---- struct utf8_data ud; enum utf8_state more; ! out = copy = xcalloc(2, strlen(expanded) + 1); while (*cp != '\0') { if (width >= limit) break; *************** *** 1150,1156 **** return (xstrdup(expanded)); skip = total_width - limit; ! out = copy = xcalloc(1, strlen(expanded) + 1); while (*cp != '\0') { if (*cp == '#') { end = format_leading_hashes(cp, &n, &leading_width); --- 1150,1156 ---- return (xstrdup(expanded)); skip = total_width - limit; ! out = copy = xcalloc(2, strlen(expanded) + 1); while (*cp != '\0') { if (*cp == '#') { end = format_leading_hashes(cp, &n, &leading_width);