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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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(-)

Browse pgsql-committers by date

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