diff --git a/ChangeLog b/ChangeLog index 9394aaf..3f92e6a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,8 +2,8 @@ Change Log for PCRE2 -------------------- -Version 10.32-RC1 13-August-2018 --------------------------------- +Version 10.32-RC1 10-September-2018 +----------------------------------- 1. When matching using the the REG_STARTEND feature of the POSIX API with a non-zero starting offset, unset capturing groups with lower numbers than a @@ -189,6 +189,14 @@ pattern, but the behaviour is now consistent. (for an event that could never occur but you had to have external information to know that). +42. If before the first match in a file that was being searched by pcre2grep +there was a line that was sufficiently long to cause the input buffer to be +expanded, the variable holding the location of the end of the previous match +was being adjusted incorrectly, and could cause an overflow warning from a code +sanitizer. However, as the value is used only to print pending "after" lines +when the next match is reached (and there are no such lines in this case) this +bug could do no damage. + Version 10.31 12-February-2018 ------------------------------ diff --git a/src/pcre2grep.c b/src/pcre2grep.c index 6c7c2a7..d5f34c8 100644 --- a/src/pcre2grep.c +++ b/src/pcre2grep.c @@ -2364,7 +2364,7 @@ int filepos = 0; unsigned long int linenumber = 1; unsigned long int lastmatchnumber = 0; unsigned long int count = 0; -char *lastmatchrestart = NULL; +char *lastmatchrestart = main_buffer; char *ptr = main_buffer; char *endptr; PCRE2_SIZE bufflength;