commit | 527a2d86fb375fcc7b34e80fc47f4c7126fc12ba | [log] [tgz] |
---|---|---|
author | Bram Moolenaar <Bram@vim.org> | Thu Feb 21 22:28:51 2019 +0100 |
committer | Bram Moolenaar <Bram@vim.org> | Thu Feb 21 22:28:51 2019 +0100 |
tree | e2fe29e171da1e3b7d40c654bc348ba7009e1926 | |
parent | 1417031cfd31dd1af9bab686237cb1c8591e0a37 [diff] [blame] |
patch 8.1.0968: crash when using search pattern \%Ufffffc23 Problem: Crash when using search pattern \%Ufffffc23. Solution: Limit character to INT_MAX. (closes #4009)
diff --git a/src/regexp_nfa.c b/src/regexp_nfa.c index 333c006..ba75834 100644 --- a/src/regexp_nfa.c +++ b/src/regexp_nfa.c
@@ -1475,7 +1475,7 @@ default: nr = -1; break; } - if (nr < 0) + if (nr < 0 || nr > INT_MAX) EMSG2_RET_FAIL( _("E678: Invalid character after %s%%[dxouU]"), reg_magic == MAGIC_ALL);