Re: pgsql: move hex_decode() to /common so it can be called from frontend - Mailing list pgsql-committers

From Bruce Momjian
Subject Re: pgsql: move hex_decode() to /common so it can be called from frontend
Date
Msg-id 20201225014733.GC21105@momjian.us
Whole thread Raw
In response to Re: pgsql: move hex_decode() to /common so it can be called from frontend  (Michael Paquier <michael@paquier.xyz>)
Responses Re: pgsql: move hex_decode() to /common so it can be called from frontend
List pgsql-committers
On Fri, Dec 25, 2020 at 09:04:41AM +0900, Michael Paquier wrote:
> Looks like the defense put in place by 6b1c5ca has allowed to catch up
> a bug here.  When base64 has been copied from encode.c to src/common/
> for SCRAM (newlines should not be handled by SCRAM, hence the copy),
> we have done the same.  The copied code just returns -1 for error
> paths.  For this case, I think that you should also prefix those
> functions with "pg_", and also include the encode part for
> completeness.

I now understand the wisdom of your suggestion.  Attached is a patch
that removes hex_decode from ecpg properly, and returns -1 from the
/common version.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EnterpriseDB                             https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee


Attachment

pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: pgsql: move hex_decode() to /common so it can be called from frontend
Next
From: Tom Lane
Date:
Subject: Re: pgsql: move hex_decode() to /common so it can be called from frontend