Merge branch 'js/regexec-buf'
commit6a67695268562f67babdb7d5195c8a43cc4015fa
authorJunio C Hamano <gitster@pobox.com>
Mon, 26 Sep 2016 23:09:19 +0000 (26 16:09 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 26 Sep 2016 23:09:19 +0000 (26 16:09 -0700)
treeb5bbacc08e466f6de62cf2e9fd450d71ef0ea6c7
parent31b83f361bd962e9c5f96bf7714051d77f592af2
parentb7d36ffca02c23f545d6e098d78180e6e72dfd8d
Merge branch 'js/regexec-buf'

Some codepaths in "git diff" used regexec(3) on a buffer that was
mmap(2)ed, which may not have a terminating NUL, leading to a read
beyond the end of the mapped region.  This was fixed by introducing
a regexec_buf() helper that takes a <ptr,len> pair with REG_STARTEND
extension.

* js/regexec-buf:
  regex: use regexec_buf()
  regex: add regexec_buf() that can work on a non NUL-terminated string
  regex: -G<pattern> feeds a non NUL-terminated string to regexec() and fails
Makefile
diff.c
diffcore-pickaxe.c
git-compat-util.h
grep.c
xdiff-interface.c