diff options
author | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-04-04 19:04:57 +0300 |
---|---|---|
committer | Heikki Linnakangas <heikki.linnakangas@iki.fi> | 2013-04-04 19:32:20 +0300 |
commit | 7a30f29b05043939a95c178068b215efd489348d (patch) | |
tree | f5ef2135f522fdd94b1806a1c5a201b95f174558 /src/include/regex/regguts.h | |
parent | 292f7b27260aaebd27f66db2fc14e8c8da975513 (diff) |
Fix crash on compiling a regular expression with more than 32k colors.
Throw an error instead.
Backpatch to all supported branches.
Diffstat (limited to 'src/include/regex/regguts.h')
-rw-r--r-- | src/include/regex/regguts.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/include/regex/regguts.h b/src/include/regex/regguts.h index 973e99a0823..9cd0ef9fdf6 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 */ |