Re: [PATCH 08/18] use st_add and st_mult for allocation size computation

2016-02-15 Thread Eric Sunshine
On Mon, Feb 15, 2016 at 4:53 PM, Jeff King wrote: > If our size computation overflows size_t, we may allocate a > much smaller buffer than we expected and overflow it. It's > probably impossible to trigger an overflow in most of these > sites in practice, but it is easy enough

[PATCH 08/18] use st_add and st_mult for allocation size computation

2016-02-15 Thread Jeff King
If our size computation overflows size_t, we may allocate a much smaller buffer than we expected and overflow it. It's probably impossible to trigger an overflow in most of these sites in practice, but it is easy enough convert their additions and multiplications into overflow-checking variants.