Skip to content

Commit

Permalink
regcomp.c: Fix wrong limit test
Browse files Browse the repository at this point in the history
Spotted by Hugo van der Sanden in code reading.
  • Loading branch information
khwilliamson committed Aug 22, 2019
1 parent 5fea364 commit 8d3e023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -23132,7 +23132,7 @@ Perl_parse_uniprop_string(pTHX_

/* If the original input began with 'In' or 'Is', it could be a subroutine
* call to a user-defined property instead of a Unicode property name. */
if ( non_pkg_begin + name_len > 2
if ( name_len - non_pkg_begin > 2
&& name[non_pkg_begin+0] == 'I'
&& (name[non_pkg_begin+1] == 'n' || name[non_pkg_begin+1] == 's'))
{
Expand Down

0 comments on commit 8d3e023

Please sign in to comment.