Re: [PATCH v2] lib: string_helpers: silence snprintf() output truncation warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux