From: Pádraig Brady
Date: Wed, 29 Apr 2026 10:48:15 +0000 (+0100) Subject: cut: use MCEL_LEN_MAX rather than MB_LEN_MAX X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=dc723665b5edbb9ebe3d22dda76d0b77d3264c10;p=thirdparty%2Fcoreutils.git cut: use MCEL_LEN_MAX rather than MB_LEN_MAX * src/cut.c: We use the mcel interface to populate these arrays, so restrict to the mcel supported max. This is more efficient as generally stateful encodings are not used or supported. --- diff --git a/src/cut.c b/src/cut.c index 6fa4d0727e..3ec406586e 100644 --- a/src/cut.c +++ b/src/cut.c @@ -90,7 +90,7 @@ static bool complement; static mcel_t delim_mcel; /* The delimiter bytes. */ -static char delim_bytes[MB_LEN_MAX]; +static char delim_bytes[MCEL_LEN_MAX]; /* The delimiter for each line/record. */ static unsigned char line_delim = '\n'; @@ -103,7 +103,7 @@ static size_t output_delimiter_length; static char *output_delimiter_string; /* The output delimiter string contents, if the default. */ -static char output_delimiter_default[MB_LEN_MAX]; +static char output_delimiter_default[MCEL_LEN_MAX]; /* True if we have ever read standard input. */ static bool have_read_stdin;