Skip site navigation (1) Skip section navigation (2)

pgsql: pg_upgrade: fix off-by-one mistake in snprintf

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: pg_upgrade: fix off-by-one mistake in snprintf
Date: 2012-06-29 03:50:04
Message-ID: E1SkSDc-0001HU-6F@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
pg_upgrade: fix off-by-one mistake in snprintf

snprintf counts trailing NUL towards the char limit.  Failing to account
for that was causing an invalid value to be passed to pg_resetxlog -l,
aborting the upgrade process.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/9e26326ad6cd11ac32d11e6cbeb613443f361da6

Modified Files
--------------
contrib/pg_upgrade/controldata.c |    2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

pgsql-committers by date

Next:From: Tom LaneDate: 2012-06-29 04:52:14
Subject: pgsql: Fix NOTIFY to cope with I/O problems,such as out-of-disk-space.
Previous:From: Tom LaneDate: 2012-06-28 18:19:34
Subject: pgsql: Provide MAP_FAILED if sys/mman.h doesn't.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group