pgsql: Fix buffer allocations in encoding conversion routines so that - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Fix buffer allocations in encoding conversion routines so that
Date
Msg-id 20090228184953.DFE637559ED@cvs.postgresql.org
Whole thread Raw
List 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.

Tags:
----
REL8_3_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic:
        cyrillic_and_mic.c (r1.16.2.2 -> r1.16.2.3)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c?r1=1.16.2.2&r2=1.16.2.3)
    pgsql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis:
        euc_jp_and_sjis.c (r1.19.2.1 -> r1.19.2.2)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c?r1=1.19.2.1&r2=1.19.2.2)
    pgsql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5:
        euc_tw_and_big5.c (r1.18.2.1 -> r1.18.2.2)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c?r1=1.18.2.1&r2=1.18.2.2)
    pgsql/src/backend/utils/mb/conversion_procs/latin2_and_win1250:
        latin2_and_win1250.c (r1.15.2.1 -> r1.15.2.2)

(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c?r1=1.15.2.1&r2=1.15.2.2)

pgsql-committers by date:

Previous
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix buffer allocations in encoding conversion routines so that
Next
From: tgl@postgresql.org (Tom Lane)
Date:
Subject: pgsql: Fix buffer allocations in encoding conversion routines so that