aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_clause.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-19 20:34:20 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-19 20:34:20 +0000
commit4ca7a2dacb3090172f1c28fa3688faa2d6ba33c6 (patch)
treed78ea41a1618806241398315f320d10ac6049033 /src/backend/parser/parse_clause.c
parent0e5b4f0e23c18cf62d888294f2b2b055bcdc2327 (diff)
downloadpostgresql-4ca7a2dacb3090172f1c28fa3688faa2d6ba33c6.tar.gz
postgresql-4ca7a2dacb3090172f1c28fa3688faa2d6ba33c6.zip
Make replace(), split_part(), and string_to_array() behave somewhat sanely
when handed an invalidly-encoded pattern. The previous coding could get into an infinite loop if pg_mb2wchar_with_len() returned a zero-length string after we'd tested for nonempty pattern; which is exactly what it will do if the string consists only of an incomplete multibyte character. This led to either an out-of-memory error or a backend crash depending on platform. Per report from Wiktor Wodecki.
Diffstat (limited to 'src/backend/parser/parse_clause.c')
0 files changed, 0 insertions, 0 deletions