From dc723665b5edbb9ebe3d22dda76d0b77d3264c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A1draig=20Brady?= Date: Wed, 29 Apr 2026 11:48:15 +0100 Subject: [PATCH] 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. --- src/cut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cut.c b/src/cut.c index 6fa4d0727..3ec406586 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;