Re: [PATCH v4 3/3] regex: use regexec_buf()

2016-09-25 Thread Johannes Schindelin
Hi Peff, On Wed, 21 Sep 2016, Jeff King wrote: > On Wed, Sep 21, 2016 at 08:24:14PM +0200, Johannes Schindelin wrote: > > > The new regexec_buf() function operates on buffers with an explicitly > > specified length, rather than NUL-terminated strings. > > > > We need to use this function whenev

Re: [PATCH v4 3/3] regex: use regexec_buf()

2016-09-21 Thread Jeff King
On Wed, Sep 21, 2016 at 08:24:14PM +0200, Johannes Schindelin wrote: > The new regexec_buf() function operates on buffers with an explicitly > specified length, rather than NUL-terminated strings. > > We need to use this function whenever the buffer we want to pass to > regexec() may have been mm

Re: [PATCH v4 3/3] regex: use regexec_buf()

2016-09-21 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Schindelin writes: > >> The new regexec_buf() function operates on buffers with an explicitly >> specified length, rather than NUL-terminated strings. >> >> We need to use this function whenever the buffer we want to pass to >> regexec() may have been mmap()ed (

Re: [PATCH v4 3/3] regex: use regexec_buf()

2016-09-21 Thread Junio C Hamano
Johannes Schindelin writes: > The new regexec_buf() function operates on buffers with an explicitly > specified length, rather than NUL-terminated strings. > > We need to use this function whenever the buffer we want to pass to > regexec() may have been mmap()ed (and is hence not NUL-terminated).

[PATCH v4 3/3] regex: use regexec_buf()

2016-09-21 Thread Johannes Schindelin
The new regexec_buf() function operates on buffers with an explicitly specified length, rather than NUL-terminated strings. We need to use this function whenever the buffer we want to pass to regexec() may have been mmap()ed (and is hence not NUL-terminated). Note: the original motivation for thi