Re: [PATCH v4 0/3] Fix a segfault caused by regexec() being called on mmap()ed data

2016-09-21 Thread Jeff King
On Wed, Sep 21, 2016 at 08:23:11PM +0200, Johannes Schindelin wrote: > We solve this by introducing a helper, regexec_buf(), that takes a > pointer and a length instead of a NUL-terminated string. > > This helper then uses REG_STARTEND where available, and falls back to > allocating and construct

[PATCH v4 0/3] Fix a segfault caused by regexec() being called on mmap()ed data

2016-09-21 Thread Johannes Schindelin
[Cc:ing Benjamin Kramer & René Scharfe because they both worked on the REG_STARTEND code in grep.c that I replace in this iteration of the patch series] This patch series addresses a problem where `git diff` is called using `-G` or `-S --pickaxe-regex` on new-born files that are configured without