diff options
author | dgp <dgp@users.sourceforge.net> | 2013-04-08 19:59:03 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2013-04-08 19:59:03 (GMT) |
commit | b33c30f98bfe09a38ef7a2106610e2d0d0605a45 (patch) | |
tree | 66cc82c126d9de0e6ce6bc9579d76026b029826b /generic/regguts.h | |
parent | ba5ae0ab74c4217f0a951b0eb3edf223022af5c5 (diff) | |
parent | e62eab9118e1460d3afe28e01dc2b83bbb63194c (diff) | |
download | tcl-b33c30f98bfe09a38ef7a2106610e2d0d0605a45.zip tcl-b33c30f98bfe09a38ef7a2106610e2d0d0605a45.tar.gz tcl-b33c30f98bfe09a38ef7a2106610e2d0d0605a45.tar.bz2 |
3610026 Stop crash when the number of "colors" in a regular expression
overflows a short int. Thanks to Heikki Linnakangas for the report and
the patch.
Diffstat (limited to 'generic/regguts.h')
-rw-r--r-- | generic/regguts.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/generic/regguts.h b/generic/regguts.h index 67e3d03..bfa7921 100644 --- a/generic/regguts.h +++ b/generic/regguts.h @@ -162,6 +162,7 @@ typedef short color; /* colors of characters */ typedef int pcolor; /* what color promotes to */ +#define MAX_COLOR SHRT_MAX /* max color value */ #define COLORLESS (-1) /* impossible color */ #define WHITE 0 /* default color, parent of all others */ |