pgsql: Fix buffer allocations in encoding conversion routines so that

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix buffer allocations in encoding conversion routines so that
Date: 2009-02-28 18:49:42
Message-ID: 20090228184942.D76D27559ED@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
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.

Modified Files:
--------------
pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic:
cyrillic_and_mic.c (r1.19 -> r1.20)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c?r1=1.19&r2=1.20)
pgsql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis:
euc_jp_and_sjis.c (r1.21 -> r1.22)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c?r1=1.21&r2=1.22)
pgsql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5:
euc_tw_and_big5.c (r1.20 -> r1.21)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c?r1=1.20&r2=1.21)
pgsql/src/backend/utils/mb/conversion_procs/latin2_and_win1250:
latin2_and_win1250.c (r1.17 -> r1.18)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c?r1=1.17&r2=1.18)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-02-28 18:49:53 pgsql: Fix buffer allocations in encoding conversion routines so that
Previous Message Tom Lane 2009-02-28 03:51:05 pgsql: Shave a few cycles in compare_pathkeys() by checking for