aboutsummaryrefslogtreecommitdiff
path: root/src/backend/regex/regexec.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-18 02:15:29 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-18 02:15:29 +0000
commitbe4b8a867f4698e118b8d1930dfe713e125d78db (patch)
tree8b8ce5952a49c323464c17cd8e4f2013f9c23d17 /src/backend/regex/regexec.c
parent6bdfde9a7790ff350f176ae6506c4a061d7f02f4 (diff)
downloadpostgresql-be4b8a867f4698e118b8d1930dfe713e125d78db.tar.gz
postgresql-be4b8a867f4698e118b8d1930dfe713e125d78db.zip
Don't use %s-with-precision format spec to truncate data being displayed
in a COPY error message. It seems that glibc gets indigestion if it is asked to truncate strings that contain invalid UTF-8 encoding sequences. vsnprintf will return -1 in such cases, leading to looping and eventual memory overflow in elog.c. Instead use our own, more robust pg_mbcliplen routine. I believe this problem accounts for several recent reports of unexpected 'out of memory' errors during COPY IN.
Diffstat (limited to 'src/backend/regex/regexec.c')
0 files changed, 0 insertions, 0 deletions