Re: Leakproofness of texteq()/textne() - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Leakproofness of texteq()/textne()
Date
Msg-id CA+TgmoZdZAb1y9vN89cmW0TAKkOF=W2jK+rzv4AKm1BrhgwROw@mail.gmail.com
Whole thread Raw
In response to Re: Leakproofness of texteq()/textne()  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Leakproofness of texteq()/textne()
List pgsql-hackers
On Thu, Sep 12, 2019 at 12:19 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> After burrowing down further, it's visibly the case that
> text_cmp and varstr_cmp don't leak in the sense of actually
> reporting any part of their input strings.  What they do do,
> in some code paths, is things like
>
>         ereport(ERROR,
>                 (errmsg("could not convert string to UTF-16: error code %lu",
>                         GetLastError())));

Is this possible? I mean, I'm sure it could happen if the data's
corrupted, but we ought to have validated it on the way into the
database. But maybe this code path also gets used for non-Unicode
encodings?

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Leakproofness of texteq()/textne()
Next
From: Tom Lane
Date:
Subject: Re: Leakproofness of texteq()/textne()