]> granicus.if.org Git - postgresql/commit
Truncate strings in tarCreateHeader() with strlcpy(), not sprintf().
authorNoah Misch <noah@leadboat.com>
Mon, 22 Jun 2015 00:04:36 +0000 (20:04 -0400)
committerNoah Misch <noah@leadboat.com>
Mon, 22 Jun 2015 00:05:11 +0000 (20:05 -0400)
commit45a1d7770743345b712dc6bdda71dd06967846be
treeaacfbe22fe200794c785ef17608f860b11c8c34e
parent2031931440e382c58fe21944c5e707e4a16da5df
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.
src/port/tar.c