From: Junio C Hamano Date: Mon, 26 Sep 2016 23:09:19 +0000 (-0700) Subject: Merge branch 'js/regexec-buf' X-Git-Tag: v2.11.0-rc0~110 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/6a67695268562f67babdb7d5195c8a43cc4015fa 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 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 feeds a non NUL-terminated string to regexec() and fails --- 6a67695268562f67babdb7d5195c8a43cc4015fa diff --cc Makefile index e8b060a235,c6dc42d067..1aad150b34 --- a/Makefile +++ b/Makefile @@@ -296,12 -296,8 +296,13 @@@ all: # Define USE_NED_ALLOCATOR if you want to replace the platforms default # memory allocators with the nedmalloc allocator written by Niall Douglas. # +# Define OVERRIDE_STRDUP to override the libc version of strdup(3). +# This is necessary when using a custom allocator in order to avoid +# crashes due to allocation and free working on different 'heaps'. +# It's defined automatically if USE_NED_ALLOCATOR is set. +# - # Define NO_REGEX if you have no or inferior regex support in your C library. + # Define NO_REGEX if your C library lacks regex support with REG_STARTEND + # feature. # # Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the # user.