From 88b000c1b6daabd9044cd3c68b0b9e94eacb4c65 Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Thu, 4 Apr 2013 19:04:57 +0300 Subject: Fix crash on compiling a regular expression with more than 32k colors. Throw an error instead. Backpatch to all supported branches. --- src/include/regex/regguts.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/regex/regguts.h') diff --git a/src/include/regex/regguts.h b/src/include/regex/regguts.h index 81442a231e3..968a04edd99 100644 --- a/src/include/regex/regguts.h +++ b/src/include/regex/regguts.h @@ -148,6 +148,7 @@ typedef short color; /* colors of characters */ typedef int pcolor; /* what color promotes to */ +#define MAX_COLOR 32767 /* max color (must fit in 'color' datatype) */ #define COLORLESS (-1) /* impossible color */ #define WHITE 0 /* default color, parent of all others */ -- cgit v1.2.3