[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <173057816122.2383427.17386979359924647248.b4-ty@kernel.org>
Date: Sat, 2 Nov 2024 13:09:22 -0700
From: Kees Cook <kees@...nel.org>
To: Andy Shevchenko <andy@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
James Bottomley <James.Bottomley@...senPartnership.com>,
Bartosz Golaszewski <brgl@...ev.pl>
Cc: Kees Cook <kees@...nel.org>,
linux-hardening@...r.kernel.org,
linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>,
stable@...r.kernel.org
Subject: Re: [PATCH v2] lib: string_helpers: silence snprintf() output truncation warning
On Fri, 01 Nov 2024 21:54:53 +0100, Bartosz Golaszewski wrote:
> The output of ".%03u" with the unsigned int in range [0, 4294966295] may
> get truncated if the target buffer is not 12 bytes. This can't really
> happen here as the 'remainder' variable cannot exceed 999 but the
> compiler doesn't know it. To make it happy just increase the buffer to
> where the warning goes away.
>
>
> [...]
Applied to for-next/hardening, thanks!
[1/1] lib: string_helpers: silence snprintf() output truncation warning
https://git.kernel.org/kees/c/a508ef4b1dcc
Take care,
--
Kees Cook
Powered by blists - more mailing lists