aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2001-03-08 00:24:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2001-03-08 00:24:34 +0000
commit572fda27118f7e54c7e4ebb75b48d33896e5f776 (patch)
tree744a314265185c7d65b9e7ebfca3c28c608409d7 /src/backend/tcop/postgres.c
parentb109b03feaec96aab6c635137b5a668389df8d31 (diff)
downloadpostgresql-572fda27118f7e54c7e4ebb75b48d33896e5f776.tar.gz
postgresql-572fda27118f7e54c7e4ebb75b48d33896e5f776.zip
Modify wchar conversion routines to not fetch the next byte past the end
of a counted input string. Marinos Yannikos' recent crash report turns out to be due to applying pg_ascii2wchar_with_len to a TEXT object that is smack up against the end of memory. This is the second just-barely- reproducible bug report I have seen that traces to some bit of code fetching one more byte than it is allowed to. Let's be more careful out there, boys and girls. While at it, I changed the code to not risk a similar crash when there is a truncated multibyte character at the end of an input string. The output in this case might not be the most reasonable output possible; if anyone wants to improve it further, step right up...
Diffstat (limited to 'src/backend/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions