Fix spurious error in pcre2test when single-letter modifiers at the end of a line have trailing spaces.
This commit is contained in:
parent
03fe310abf
commit
5b1ef05ab0
@ -210,6 +210,9 @@ erroneous error "\ at end of pattern".
|
||||
errors or other strange effects if compiled in UCP mode. Found with libFuzzer
|
||||
and AddressSanitizer.
|
||||
|
||||
61. Whitespace at the end of a pcre2test pattern line caused a spurious error
|
||||
message if there were only single-character modifiers. It should be ignored.
|
||||
|
||||
|
||||
Version 10.20 30-June-2015
|
||||
--------------------------
|
||||
|
@ -3111,7 +3111,11 @@ for (;;)
|
||||
/* Find the end of the item; lose trailing whitespace at end of line. */
|
||||
|
||||
for (ep = p; *ep != 0 && *ep != ','; ep++);
|
||||
if (*ep == 0) while (ep > p && isspace(ep[-1])) ep--;
|
||||
if (*ep == 0)
|
||||
{
|
||||
while (ep > p && isspace(ep[-1])) ep--;
|
||||
*ep = 0;
|
||||
}
|
||||
|
||||
/* Remember if the first character is '-'. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user