diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2007-07-19 20:34:48 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2007-07-19 20:34:48 +0000 |
commit | 6e606074e1548a0847040f6ec789867826a4b0f9 (patch) | |
tree | 1fc698e9ec45745c6b66ccc5c0c1fbf9e3982572 /src/backend/utils/error/elog.c | |
parent | da15b2852e89c9b3348759febd864c436a78e3b9 (diff) | |
download | postgresql-6e606074e1548a0847040f6ec789867826a4b0f9.tar.gz postgresql-6e606074e1548a0847040f6ec789867826a4b0f9.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/utils/error/elog.c')
0 files changed, 0 insertions, 0 deletions