postgresql/src/backend/utils
Tom Lane 191c52a27b Work around a subtle portability problem in use of printf %s format.
Depending on which spec you read, field widths and precisions in %s may be
counted either in bytes or characters.  Our code was assuming bytes, which
is wrong at least for glibc's implementation, and in any case libc might
have a different idea of the prevailing encoding than we do.  Hence, for
portable results we must avoid using anything more complex than just "%s"
unless the string to be printed is known to be all-ASCII.

This patch fixes the cases I could find, including the psql formatting
failure reported by Hernan Gonzalez.  In HEAD only, I also added comments
to some places where it appears safe to continue using "%.*s".
2010-05-08 16:40:03 +00:00
..
adt Export xml.c's libxml-error-handling support so that contrib/xml2 can use it 2010-03-03 17:29:53 +00:00
cache Fix a problem introduced by my patch of 2010-01-12 that revised the way 2010-04-14 21:31:20 +00:00
error Work around a subtle portability problem in use of printf %s format. 2010-05-08 16:40:03 +00:00
fmgr Prevent indirect security attacks via changing session-local state within 2009-12-09 21:58:04 +00:00
hash Update copyright for 2009. 2009-01-01 17:24:05 +00:00
init Prevent indirect security attacks via changing session-local state within 2009-12-09 21:58:04 +00:00
mb 8.4 pgindent run, with new combined Linux/FreeBSD/MinGW typedef list 2009-06-11 14:49:15 +00:00
misc Prevent ALTER USER f RESET ALL from removing the settings that were put there 2010-03-25 14:44:51 +00:00
mmgr Force READY portals into FAILED state when a transaction or subtransaction 2010-02-18 03:06:53 +00:00
resowner Fix bug in temporary file management with subtransactions. A cursor opened 2009-12-03 11:03:35 +00:00
sort Previous fix for temporary file management broke returning a set from 2009-12-29 17:41:09 +00:00
time Fix snapshot management, take two. 2009-10-07 16:27:29 +00:00
.cvsignore Cleanup to ensure good state of derived files in tarballs. 2000-06-09 02:38:36 +00:00
Gen_dummy_probes.sed Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Gen_fmgrtab.pl Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Gen_fmgrtab.sh Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Makefile Add a few more DTrace probes to the backend. 2008-08-01 13:16:09 +00:00
probes.d Revert DTrace patch from Robert Lor 2009-04-02 20:59:10 +00:00