Fix buffer allocations in encoding conversion routines so that they won't

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 5156266ab65d67b92493663435051a8bf36ae47d
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2009-02-28T18:50:25Z
Releases: 7.4.25
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.

Files