Re: [PATCH] line-log.c: prevent crash during union of too many ranges

2017-03-03 Thread Junio C Hamano
Allan Xavier writes: > The existing implementation of range_set_union does not correctly > reallocate memory, leading to a heap overflow when it attempts to union > more than 24 separate line ranges. > ... I'll add "Reviewed-by: Jeff King " and queue, as I know we already reviewed the change. T

[PATCH] line-log.c: prevent crash during union of too many ranges

2017-03-02 Thread Allan Xavier
The existing implementation of range_set_union does not correctly reallocate memory, leading to a heap overflow when it attempts to union more than 24 separate line ranges. For struct range_set *out to grow correctly it must have out->nr set to the current size of the buffer when it is passed to r