-
- Downloads
Replace argument-checking Asserts with regular test-and-elog checks in all
encoding conversion functions. These are not can't-happen cases because it's possible to create a conversion with the wrong conversion function for the specified encoding pair. That would lead to an Assert crash in an Assert-enabled build, or incorrect conversion otherwise, neither of which is desirable. This would be a DOS issue if production databases were customarily built with asserts enabled, but fortunately that's not so. Per an observation by Heikki. Back-patch to all supported branches.
Showing
- src/backend/utils/mb/conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c 3 additions, 7 deletions.../conversion_procs/utf8_and_iso8859_1/utf8_and_iso8859_1.c
- src/backend/utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c 3 additions, 7 deletions...utils/mb/conversion_procs/utf8_and_johab/utf8_and_johab.c
- src/backend/utils/mb/conversion_procs/utf8_and_shift_jis_2004/utf8_and_shift_jis_2004.c 3 additions, 7 deletions...n_procs/utf8_and_shift_jis_2004/utf8_and_shift_jis_2004.c
- src/backend/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c 3 additions, 7 deletions...d/utils/mb/conversion_procs/utf8_and_sjis/utf8_and_sjis.c
- src/backend/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c 3 additions, 7 deletions...end/utils/mb/conversion_procs/utf8_and_uhc/utf8_and_uhc.c
- src/backend/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c 3 additions, 5 deletions...end/utils/mb/conversion_procs/utf8_and_win/utf8_and_win.c
- src/backend/utils/mb/wchar.c 34 additions, 1 deletionsrc/backend/utils/mb/wchar.c
- src/include/mb/pg_wchar.h 20 additions, 1 deletionsrc/include/mb/pg_wchar.h
Loading
Please register or sign in to comment