]> granicus.if.org Git - postgresql/commit
pg_upgrade: fix off-by-one mistake in snprintf
authorAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 29 Jun 2012 03:37:27 +0000 (23:37 -0400)
committerAlvaro Herrera <alvherre@alvh.no-ip.org>
Fri, 29 Jun 2012 03:37:27 +0000 (23:37 -0400)
commit9e26326ad6cd11ac32d11e6cbeb613443f361da6
treea98e09e7ba355f12530b2971e41c8a3b3bc2eae4
parentc1494b733015bf09d75c362925ec3f2740a77f73
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.
contrib/pg_upgrade/controldata.c