Re: [PATCH] commit-slab: sizeof() the right type in xrealloc

2013-12-02 Thread Jeff King
On Sun, Dec 01, 2013 at 09:41:55PM +0100, Thomas Rast wrote: When allocating the slab, the code accidentally computed the array size from s-slab (an elemtype**). The slab is an array of elemtype*, however, so we should take the size of *s-slab. Looks obviously correct. I browsed around for

[PATCH] commit-slab: sizeof() the right type in xrealloc

2013-12-01 Thread Thomas Rast
When allocating the slab, the code accidentally computed the array size from s-slab (an elemtype**). The slab is an array of elemtype*, however, so we should take the size of *s-slab. Noticed-by: Nguyễn Thái Ngọc Duy pclo...@gmail.com Signed-off-by: Thomas Rast t...@thomasrast.ch --- [I hope