aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/regexp.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-01-18 02:15:57 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-01-18 02:15:57 +0000
commitab189aaad97b15bf4067154eb49314f1a2d5c756 (patch)
tree7c1305666da77e4db56561491e4e32d1fe45cd22 /src/backend/utils/adt/regexp.c
parent9933ba3f67d3690b69af7ad65a0e86a09a967b9b (diff)
downloadpostgresql-ab189aaad97b15bf4067154eb49314f1a2d5c756.tar.gz
postgresql-ab189aaad97b15bf4067154eb49314f1a2d5c756.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/utils/adt/regexp.c')
0 files changed, 0 insertions, 0 deletions