pgsql: Fix misplaced right paren bugs in pgstatfuncs.c. - Mailing list pgsql-committers

From Kevin Grittner
Subject pgsql: Fix misplaced right paren bugs in pgstatfuncs.c.
Date
Msg-id E1VwfCc-0006OG-E9@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Fix misplaced right paren bugs in pgstatfuncs.c.

The bug would only show up if the C sockaddr structure contained
zero in the first byte for a valid address; otherwise it would
fail to fail, which is probably why it went unnoticed for so long.

Patch submitted by Joel Jacobson after seeing an article by Andrey
Karpov in which he reports finding this through static code
analysis using PVS-Studio.  While I was at it I moved a definition
of a local variable referenced in the buggy code to a more local
context.

Backpatch to all supported branches.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/150a30e19708d8181738c52723b82d783844b337

Modified Files
--------------
src/backend/utils/adt/pgstatfuncs.c |    9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: Fix whitespace
Next
From: Kevin Grittner
Date:
Subject: pgsql: Fix misplaced right paren bugs in pgstatfuncs.c.