pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Minor cleanup/future-proofing for pg_saslprep().
3+ messages / 1 participants
[nested] [flat]

* pgsql: Minor cleanup/future-proofing for pg_saslprep().
@ 2018-09-08 22:20 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-09-08 22:20 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Minor cleanup/future-proofing for pg_saslprep().

Ensure that pg_saslprep() initializes its output argument to NULL in
all failure paths, and then remove the redundant initialization that
some (not all) of its callers did.  This does not fix any live bug,
but it reduces the odds of future bugs of omission.

Also add a comment about why the existing failure-path coding is
adequate.

Back-patch so as to keep the function's API consistent across branches,
again to forestall future bug introduction.

Patch by me, reviewed by Michael Paquier

Discussion: https://postgr.es/m/16558.1536407783@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f47f3148011f1cb5dc34396382fc2f434844d247

Modified Files
--------------
src/backend/libpq/auth-scram.c       |  4 ++--
src/common/saslprep.c                | 11 ++++++++---
src/interfaces/libpq/fe-auth-scram.c |  4 ++--
3 files changed, 12 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Minor cleanup/future-proofing for pg_saslprep().
@ 2018-09-08 22:20 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-09-08 22:20 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Minor cleanup/future-proofing for pg_saslprep().

Ensure that pg_saslprep() initializes its output argument to NULL in
all failure paths, and then remove the redundant initialization that
some (not all) of its callers did.  This does not fix any live bug,
but it reduces the odds of future bugs of omission.

Also add a comment about why the existing failure-path coding is
adequate.

Back-patch so as to keep the function's API consistent across branches,
again to forestall future bug introduction.

Patch by me, reviewed by Michael Paquier

Discussion: https://postgr.es/m/16558.1536407783@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/86d226ae5a3607b8bbde2487f821b8f8807da1c8

Modified Files
--------------
src/backend/libpq/auth-scram.c       |  4 ++--
src/common/saslprep.c                | 11 ++++++++---
src/interfaces/libpq/fe-auth-scram.c |  4 ++--
3 files changed, 12 insertions(+), 7 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* pgsql: Minor cleanup/future-proofing for pg_saslprep().
@ 2018-09-08 22:20 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2018-09-08 22:20 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Minor cleanup/future-proofing for pg_saslprep().

Ensure that pg_saslprep() initializes its output argument to NULL in
all failure paths, and then remove the redundant initialization that
some (not all) of its callers did.  This does not fix any live bug,
but it reduces the odds of future bugs of omission.

Also add a comment about why the existing failure-path coding is
adequate.

Back-patch so as to keep the function's API consistent across branches,
again to forestall future bug introduction.

Patch by me, reviewed by Michael Paquier

Discussion: https://postgr.es/m/16558.1536407783@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/930b785d40cf53d679c72ffc2c34a63d412bee5b

Modified Files
--------------
src/backend/libpq/auth-scram.c       |  4 ++--
src/common/saslprep.c                | 11 ++++++++---
src/interfaces/libpq/fe-auth-scram.c |  2 +-
3 files changed, 11 insertions(+), 6 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-09-08 22:20 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-08 22:20 pgsql: Minor cleanup/future-proofing for pg_saslprep(). Tom Lane <tgl@sss.pgh.pa.us>
2018-09-08 22:20 pgsql: Minor cleanup/future-proofing for pg_saslprep(). Tom Lane <tgl@sss.pgh.pa.us>
2018-09-08 22:20 pgsql: Minor cleanup/future-proofing for pg_saslprep(). Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox