Patch 8.0.0618
Problem: NFA regex engine handles [0-z] incorrectly.
Solution: Return at the right point. (James McCoy, closes #1703)
Files: src/regexp_nfa.c, src/testdir/test36.in, src/testdir/test36.ok
*** ../vim-8.0.0617/src/regexp_nfa.c 2017-03-29 17:30:23.164136889 +0200
--- src/regexp_nfa.c 2017-06-05 13:25:11.478219145 +0200
***************
*** 628,664 ****
config |= CLASS_o9;
break;
}
- else
if (*(p + 2) == '7')
{
config |= CLASS_o7;
break;
}
case 'a':
if (*(p + 2) == 'z')
{
config |= CLASS_az;
break;
}
- else
if (*(p + 2) == 'f')
{
config |= CLASS_af;
break;
}
case 'A':
if (*(p + 2) == 'Z')
{
config |= CLASS_AZ;
break;
}
- else
if (*(p + 2) == 'F')
{
config |= CLASS_AF;
break;
}
! /* FALLTHROUGH */
default:
return FAIL;
}
--- 628,666 ----
config |= CLASS_o9;
break;
}
if (*(p + 2) == '7')
{
config |= CLASS_o7;
break;
}
+ return FAIL;
+
case 'a':
if (*(p + 2) == 'z')
{
config |= CLASS_az;
break;
}
if (*(p + 2) == 'f')
{
config |= CLASS_af;
break;
}
+ return FAIL;
+
case 'A':
if (*(p + 2) == 'Z')
{
config |= CLASS_AZ;
break;
}
if (*(p + 2) == 'F')
{
config |= CLASS_AF;
break;
}
! return FAIL;
!
default:
return FAIL;
}
*** ../vim-8.0.0617/src/testdir/test36.in 2016-02-12 12:44:23.000000000
+0100
--- src/testdir/test36.in 2017-06-05 13:21:50.491590787 +0200
***************
*** 98,106 ****
p:s/\%#=0[^A-Z]//g
p:s/\%#=1[^A-Z]//g
p:s/\%#=2[^A-Z]//g
! p:s/\%#=0\%204l^\t...//g
! p:s/\%#=1\%205l^\t...//g
! p:s/\%#=2\%206l^\t...//g
:/^start-here/+1,$wq! test.out
ENDTEST
--- 98,112 ----
p:s/\%#=0[^A-Z]//g
p:s/\%#=1[^A-Z]//g
p:s/\%#=2[^A-Z]//g
! p:s/\%#=0\%210l^\t...//g
! p:s/\%#=1\%211l^\t...//g
! p:s/\%#=2\%212l^\t...//g
! p:s/\%#=0[0-z]//g
! p:s/\%#=1[0-z]//g
! p:s/\%#=2[0-z]//g
! p:s/\%#=0[^0-z]//g
! p:s/\%#=1[^0-z]//g
! p:s/\%#=2[^0-z]//g
:/^start-here/+1,$wq! test.out
ENDTEST
*** ../vim-8.0.0617/src/testdir/test36.ok 2016-02-12 12:45:52.000000000
+0100
--- src/testdir/test36.ok 2017-06-05 13:21:50.491590787 +0200
***************
*** 97,99 ****
--- 97,105 ----
!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé
!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé
!"#$%&'()#+'-./0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz{|}~ €‚ ›¦±¼ÇÓé
+
!"#$%&'()#+'-./{|}~ €‚ ›¦±¼ÇÓé
+
!"#$%&'()#+'-./{|}~ €‚ ›¦±¼ÇÓé
+
!"#$%&'()#+'-./{|}~ €‚ ›¦±¼ÇÓé
+ 0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz
+ 0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz
+ 0123456789:;<=>?@ABCDEFGHIXYZ[\]^_`abcdefghiwxyz
*** ../vim-8.0.0617/src/version.c 2017-06-04 21:40:31.848274467 +0200
--- src/version.c 2017-06-05 13:21:23.407776280 +0200
***************
*** 766,767 ****
--- 766,769 ----
{ /* Add new patch number below this line */
+ /**/
+ 618,
/**/
--
hundred-and-one symptoms of being an internet addict:
1. You actually wore a blue ribbon to protest the Communications Decency Act.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.