Re: [PATCH] calloc: handle wrap around in total buffer size correctly

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

 



On Wed, 24 Jul 2024 11:47:45 +0200, Ahmad Fatoum wrote:
> calloc() should allocate a memory buffer that fits the product of its
> arguments or return NULL if this is not possible.
> 
> We violated this so far and a wraparound would result in allocating a
> too small buffer leading to buffer overflows.
> 
> Fix this by using size_mull which saturates at SIZE_MAX, which malloc
> should gracefully return NULL for.
> 
> [...]

Applied, thanks!

[1/1] calloc: handle wrap around in total buffer size correctly
      https://git.pengutronix.de/cgit/barebox/commit/?id=198054e168f8 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux