pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix bogus Name assignment in CreateStatistics
2+ messages / 1 participants
[nested] [flat]

* pgsql: Fix bogus Name assignment in CreateStatistics
@ 2018-03-06 16:22 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2018-03-06 16:22 UTC (permalink / raw)
  To: pgsql-committers

Fix bogus Name assignment in CreateStatistics

Apparently, it doesn't work to use a plain cstring as a Name datum: you
may end up having random bytes because of failing to zero the bytes
after the terminating \0, as indicated by valgrind.  I introduced this
bug in 5564c1181548, so backpatch this fix to REL_10_STABLE, like that
commit.

While at it, fix a slightly misleading comment, pointed out by David
Rowley.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1ffb63a2a1767c3dd0c7611bed6383bd37bfbce6

Modified Files
--------------
src/backend/commands/statscmds.c   | 7 +++++--
src/backend/parser/parse_utilcmd.c | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)



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

* pgsql: Fix bogus Name assignment in CreateStatistics
@ 2018-03-06 16:22 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2018-03-06 16:22 UTC (permalink / raw)
  To: pgsql-committers

Fix bogus Name assignment in CreateStatistics

Apparently, it doesn't work to use a plain cstring as a Name datum: you
may end up having random bytes because of failing to zero the bytes
after the terminating \0, as indicated by valgrind.  I introduced this
bug in 5564c1181548, so backpatch this fix to REL_10_STABLE, like that
commit.

While at it, fix a slightly misleading comment, pointed out by David
Rowley.

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/commands/statscmds.c   | 7 +++++--
src/backend/parser/parse_utilcmd.c | 3 ++-
2 files changed, 7 insertions(+), 3 deletions(-)



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


end of thread, other threads:[~2018-03-06 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-06 16:22 pgsql: Fix bogus Name assignment in CreateStatistics Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-03-06 16:22 pgsql: Fix bogus Name assignment in CreateStatistics Alvaro Herrera <alvherre@alvh.no-ip.org>

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