]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix buffer allocations in encoding conversion routines so that they won't
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 28 Feb 2009 18:50:08 +0000 (18:50 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 28 Feb 2009 18:50:08 +0000 (18:50 +0000)
commit38a0507d0659af0f7f213bc7c739fd3792112d08
tree5e2c0ef80dba7f07313fc47552702667d6e5c26d
parentc2ffb2674753f4bd116146a323ab52149aa4555d
Fix buffer allocations in encoding conversion routines so that they won't
fail on zero-length inputs.  This isn't an issue in normal use because the
conversion infrastructure skips calling the converters for empty strings.
However a problem was created by yesterday's patch to check whether the
right conversion function is supplied in CREATE CONVERSION.  The most
future-proof fix seems to be to make the converters safe for this corner case.
src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c
src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c
src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c
src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c