Re: prevent invalidly encoded input - Mailing list pgsql-patches

From Tom Lane
Subject Re: prevent invalidly encoded input
Date
Msg-id 23464.1189613958@sss.pgh.pa.us
Whole thread Raw
In response to Re: prevent invalidly encoded input  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
>                       addlitchar(unescape_single_char(yytext[1]));
> +                     if (IS_HIGHBIT_SET(literalbuf[literallen]))
> +                         saw_high_bit = true;

Isn't that array subscript off-by-one?  Probably better to put the test
inside unescape_single_char(), anyway.

Otherwise it looks sane, though maybe shy a comment or so.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rename latestCompletedXid to latestCommittedXid
Next
From: Tom Lane
Date:
Subject: Re: HOT documentation README