On Sun, Nov 29, 2020 at 08:41:50AM +0100, Theo Buehler wrote:
> On Sun, Nov 29, 2020 at 08:02:45AM +0100, Emil Engler wrote:
> > It can overflow! Please check for the positivity and width of size_t before!
> 
> What can overflow? ret is guaranteed to be non-negative before the cast.
> 
> As for the width (which would be about truncation, not overflow): while
> the standard allows for size_t to be an unsigned integer type as small
> as 16 bits, we generally assume that sizeof(size_t) >= sizeof(int).
> I don't think I've ever seen a width check ensuring this in our sources.

Maybe rummage arround in the openssl attic? There migth be code that
checks for sizeof(size_t) changing during runtime :P

-- 
I'm not entirely sure you are real.

Reply via email to