Skip site navigation (1) Skip section navigation (2)

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:50:25
Message-ID: 20090228185025.1AAC67559EE@cvs.postgresql.org (view raw or flat)
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.

Tags:
----
REL7_4_STABLE

Modified Files:
--------------
    pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic:
        cyrillic_and_mic.c (r1.6.4.3 -> r1.6.4.4)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c?r1=1.6.4.3&r2=1.6.4.4)
    pgsql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis:
        euc_jp_and_sjis.c (r1.6.4.4 -> r1.6.4.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/euc_jp_and_sjis/euc_jp_and_sjis.c?r1=1.6.4.4&r2=1.6.4.5)
    pgsql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5:
        euc_tw_and_big5.c (r1.6.4.2 -> r1.6.4.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/euc_tw_and_big5/euc_tw_and_big5.c?r1=1.6.4.2&r2=1.6.4.3)
    pgsql/src/backend/utils/mb/conversion_procs/latin2_and_win1250:
        latin2_and_win1250.c (r1.6.4.2 -> r1.6.4.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mb/conversion_procs/latin2_and_win1250/latin2_and_win1250.c?r1=1.6.4.2&r2=1.6.4.3)

pgsql-committers by date

Next:From: Andrew DunstanDate: 2009-02-28 19:13:28
Subject: pgsql: Don't mangle xml and xpath unless xml is not in fact a
Previous:From: Tom LaneDate: 2009-02-28 18:50:14
Subject: pgsql: Fix buffer allocations in encoding conversion routines so that

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group