aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/gist/gist.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2007-07-19 20:34:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2007-07-19 20:34:34 +0000
commita0b2bb8ced532daf8ea173d280334109fe87e88a (patch)
tree2ebe50ab35b0f7066149367cfe730931d84bd01c /src/backend/access/gist/gist.c
parentfbbc0f05f1e0cc7618d637cdc6ce2cb96dbf9f52 (diff)
downloadpostgresql-a0b2bb8ced532daf8ea173d280334109fe87e88a.tar.gz
postgresql-a0b2bb8ced532daf8ea173d280334109fe87e88a.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/access/gist/gist.c')
0 files changed, 0 insertions, 0 deletions