Re: [PATCH v3 2/3] Introduce a function to run regexec() on non-NUL-terminated buffers

2016-09-08 Thread Junio C Hamano
Johannes Schindelin writes: > We just introduced a test that demonstrates that our sloppy use of > regexec() on a mmap()ed area can result in incorrect results or even > hard crashes. > > So what we need to fix this is a function that calls regexec() on a > length-delimited, rather than a NUL-ter

[PATCH v3 2/3] Introduce a function to run regexec() on non-NUL-terminated buffers

2016-09-08 Thread Johannes Schindelin
We just introduced a test that demonstrates that our sloppy use of regexec() on a mmap()ed area can result in incorrect results or even hard crashes. So what we need to fix this is a function that calls regexec() on a length-delimited, rather than a NUL-terminated, string. Happily, there is an ex