]> granicus.if.org Git - postgresql/commit
Fix misplaced right paren bugs in pgstatfuncs.c.
authorKevin Grittner <kgrittn@postgresql.org>
Fri, 27 Dec 2013 21:41:02 +0000 (15:41 -0600)
committerKevin Grittner <kgrittn@postgresql.org>
Fri, 27 Dec 2013 21:41:02 +0000 (15:41 -0600)
commit150a30e19708d8181738c52723b82d783844b337
tree62c5ef087fa20bfd184d6722ed4e386b9fb82356
parent0c07ef1ad2ba73a6a050f3e1a19267f961a43586
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.
src/backend/utils/adt/pgstatfuncs.c