Re: [PATCHv2] pickaxe: fix segfault with '-S<...> --pickaxe-regex'

2017-03-21 Thread Johannes Schindelin
Hi Gábor, On Sat, 18 Mar 2017, SZEDER Gábor wrote: > 'git {log,diff,...} -S<...> --pickaxe-regex' can segfault as a result of > out-of-bounds memory reads. > > diffcore-pickaxe.c:contains() looks for all matches of the given regex > in a buffer in a loop, advancing the buffer pointer to the end

[PATCHv2] pickaxe: fix segfault with '-S<...> --pickaxe-regex'

2017-03-18 Thread SZEDER Gábor
'git {log,diff,...} -S<...> --pickaxe-regex' can segfault as a result of out-of-bounds memory reads. diffcore-pickaxe.c:contains() looks for all matches of the given regex in a buffer in a loop, advancing the buffer pointer to the end of the last match in each iteration. When we switched to REG_S