1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-13 16:22:44 +03:00
Files
postgres/src/backend/utils/mb
Tom Lane 572fda2711 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...
2001-03-08 00:24:34 +00:00
..

common.c:	public functions for both the backend and the frontend.
		requires conv.c and wchar.c
conv.c:		static functions and a public table for code conversion
wchar.c:	mostly static functions and a public table for mb string and
		multi-byte conversion
mbutilc.c:	public functions for the backend only.
		requires conv.c and wchar.c
wstrcmp.c:	strcmp for mb
wstrncmp.c:	strncmp for mb
alt.c:		a tool to generate KOI8 <--> CP866 conversion table
iso.c:		a tool to generate KOI8 <--> ISO8859-5 conversion table
win.c:		a tool to generate KOI8 <--> CP1251 conversion table
big5.c:		conversion between BIG5 and Mule Internal Code(CNS 116643-1992
		plane 1 and plane 2).
utftest.c:	test driver for utf2wchar()