diff options
Diffstat (limited to 'gl/lib/regcomp.c.diff')
-rw-r--r-- | gl/lib/regcomp.c.diff | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gl/lib/regcomp.c.diff b/gl/lib/regcomp.c.diff new file mode 100644 index 000000000..88097a445 --- /dev/null +++ b/gl/lib/regcomp.c.diff @@ -0,0 +1,23 @@ +diff --git a/lib/regcomp.c b/lib/regcomp.c +index 6472ff6..fadf36d 100644 +--- a/lib/regcomp.c ++++ b/lib/regcomp.c +@@ -18,6 +18,8 @@ + with this program; if not, write to the Free Software Foundation, + Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + ++#include "intprops.h" ++#include "verify.h" + static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, + size_t length, reg_syntax_t syntax); + static void re_compile_fastmap_iter (regex_t *bufp, +@@ -2571,7 +2573,8 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, + /* This loop is actually executed only when end != REG_MISSING, + to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have + already created the start+1-th copy. */ +- if ((Idx) -1 < 0 || end != REG_MISSING) ++ verify (! TYPE_SIGNED (Idx)); ++ if (end != REG_MISSING) + for (i = start + 2; i <= end; ++i) + { + elem = duplicate_tree (elem, dfa); |