mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 03:23:04 +01:00
Correction and more comments for fix for CORE-1063
This commit is contained in:
parent
c1c76aa666
commit
480f934c22
@ -703,8 +703,11 @@ ISC_STATUS filter_transliterate_text(USHORT action, BlobControl* control)
|
||||
if (action == isc_blob_filter_open) {
|
||||
// hvlad: avoid possible overflow of USHORT variables converting long
|
||||
// blob segments into multibyte encoding
|
||||
// Also buffer must contain integer number of utf16 characters as we
|
||||
// do transliteration via utf16 character set
|
||||
// (see assert at start of UnicodeUtil::utf16ToUtf8 for example)
|
||||
const SLONG max_seg = aux->ctlaux_obj1.convertLength(source->ctl_max_segment);
|
||||
control->ctl_max_segment = MIN(MAX_USHORT - 4, max_seg);
|
||||
control->ctl_max_segment = MIN(MAX_USHORT - sizeof(ULONG) + 1, max_seg);
|
||||
|
||||
if (source->ctl_max_segment && control->ctl_max_segment)
|
||||
aux->ctlaux_expansion_factor =
|
||||
|
Loading…
Reference in New Issue
Block a user