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