pgsql: Truncate strings in tarCreateHeader() with strlcpy(), not sprint - Mailing list pgsql-committers

From Noah Misch
Subject pgsql: Truncate strings in tarCreateHeader() with strlcpy(), not sprint
Date
Msg-id E1Z6pNj-00060r-Oa@gemulon.postgresql.org
Whole thread Raw
List 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
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/4318118edd5582696027f357771e0a8b091fe2bf

Modified Files
--------------
src/bin/pg_basebackup/t/010_pg_basebackup.pl |    8 ++++++++
src/port/tar.c                               |    8 ++++----
2 files changed, 12 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Add transforms to pg_get_object_address and friends
Next
From: Noah Misch
Date:
Subject: pgsql: Truncate strings in tarCreateHeader() with strlcpy(), not sprint