git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 54cd4f0) | patch
Adjust comments about avoiding use of printf's %.*s.
Sun, 9 May 2010 02:16:00 +0000 (02:16 +0000)
Sun, 9 May 2010 02:16:00 +0000 (02:16 +0000)
commit ed437e2b27c48219a78f3504b0d05c17c2082d02
Adjust comments about avoiding use of printf's %.*s.
My initial impression that glibc was measuring the precision in characters
(which is what the Linux man page says it does) was incorrect. It does take
the precision to be in bytes, but it also tries to truncate the string at a
character boundary. The bottom line remains the same: it will mess up
if the string is not in the encoding it expects, so we need to avoid %.*s
anytime there's a significant risk of that. Previous code changes are still
good, but adjust the comments to reflect this knowledge. Per research by
Hernan Gonzalez.
src/backend/parser/scansup.c diff | blob | blame | history
src/backend/tsearch/wparser_def.c diff | blob | blame | history
src/backend/utils/adt/datetime.c diff | blob | blame | history
src/bin/psql/print.c diff | blob | blame | history
src/interfaces/ecpg/pgtypeslib/dt_common.c diff | blob | blame | history
src/interfaces/libpq/fe-misc.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /