Re: Regex with > 32k different chars causes a backend crash - Mailing list pgsql-hackers

From Noah Misch
Subject Re: Regex with > 32k different chars causes a backend crash
Date
Msg-id 20130404003256.GA11248@tornado.leadboat.com
Whole thread Raw
In response to Re: Regex with > 32k different chars causes a backend crash  (Heikki Linnakangas <hlinnakangas@vmware.com>)
Responses Re: Regex with > 32k different chars causes a backend crash
List pgsql-hackers
On Wed, Apr 03, 2013 at 08:09:15PM +0300, Heikki Linnakangas wrote:
> --- 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 value that fits in 'color' datatype */

This should use SHRT_MAX, no?  (Not that any supported platform differs here.)

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: corrupt pages detected by enabling checksums
Next
From: Andres Freund
Date:
Subject: Re: corrupt pages detected by enabling checksums