From: Paul Eggert Date: Sun, 27 Jul 2025 19:36:53 +0000 (-0700) Subject: tail: check OFF_T_MAX vs COPY_A_BUFFER X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ae37265727ad5e6f43a4887e2d977e8ffb59ce65;p=thirdparty%2Fcoreutils.git tail: check OFF_T_MAX vs COPY_A_BUFFER * src/tail.c: Document an otherwise-unstated assumption. --- diff --git a/src/tail.c b/src/tail.c index 255f581fa1..8dd03a7c4d 100644 --- a/src/tail.c +++ b/src/tail.c @@ -81,6 +81,7 @@ /* Special values for dump_remainder's N_BYTES parameter. */ #define COPY_TO_EOF UINTMAX_MAX #define COPY_A_BUFFER (UINTMAX_MAX - 1) +static_assert (OFF_T_MAX < COPY_A_BUFFER); /* FIXME: make Follow_name the default? */ #define DEFAULT_FOLLOW_MODE Follow_descriptor