pgsql: Truncate strings in tarCreateHeader() with strlcpy(), not sprint

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Truncate strings in tarCreateHeader() with strlcpy(), not sprint
Date: 2015-06-22 00:14:35
Message-ID: E1Z6pNj-00060z-PA@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Truncate strings in tarCreateHeader() with strlcpy(), not sprintf().

This supplements the GNU libc bug #6530 workarounds introduced in commit
54cd4f04576833abc394e131288bf3dd7dcf4806. On affected systems, a
tar-format pg_basebackup failed when some filename beneath the data
directory was not valid character data in the postmaster/walsender
locale. Back-patch to 9.1, where pg_basebackup was introduced. Extant,
bug-prone conversion specifications receive only ASCII bytes or involve
low-importance messages.

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/926efeb042f64083e127b165ac98752dfccbff1f

Modified Files
--------------
src/backend/replication/basebackup.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Robert Haas 2015-06-22 18:15:58 pgsql: psql: Add some tab completion for TABLESAMPLE.
Previous Message Alvaro Herrera 2015-06-21 19:23:53 pgsql: Add transforms to pg_get_object_address and friends