]> 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:01 +0000 (18:50 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 28 Feb 2009 18:50:01 +0000 (18:50 +0000)
commit08a09890146c54a6db9dae54315faad846abfbef
tree4d4ebdac6c2522002468c0023e6cc3ce0d81ec6f
parent03ead2ae5471a48519d359232a7808f350123fbb
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