🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.git
1 messages
1 total messages Started by Andy Koppe Sun, 22 Nov 2026 06:49
Re: [PATCH v4 0/5] utf8: bounds-related fixes and a doc fix
#3569
Author: Andy Koppe
Date: Sun, 22 Nov 2026 06:49
31 lines
12389 bytes
Dirk Gouders wrote:
>
> A patch here on the list made me look at
> display_mode_esc_sequence_len() in utf8.c and I found two details in
> the file that are perhaps worth a fix:
>
> 1) utf8_strnwidth() disregards the given len argument when fed
>    with proper string and len.
>
> 2) The comment for utf8_strnwidth() is incorrect: it states the
>    function returns strlen() for cases when it actually returns its
>    len argument.

This no longer describes the series, which I think has become a bit
unfocused. I'd concentrate on these:

- The comment fix.
- The optional end pointer for display_mode_esc_sequence_len(), and
  changing the callers accordingly.
- The end guard after the display_mode_esc_sequence_len() call and the
  bounded utf8_width() call in utf8_strnwidth().

display_mode_esc_sequence_len_all() isn't needed for the fixes, and
I'm not sure it's worth adding.

As the series stands, patch 4/5 doesn't build, because `skip` is
undeclared.

Regards,
Andy
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads