mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 18:03:02 +01:00
Make sure at least one operand is promoted to FB_UINT64 before doing the multiplication.
This commit is contained in:
parent
0c3d7f3c5d
commit
b3d34b25c2
@ -3419,8 +3419,8 @@ dsc* SysFunction::substring(thread_db* tdbb, impure_value* impure,
|
||||
Firebird::HalfStaticArray<UCHAR, BUFFER_LARGE> buffer;
|
||||
CharSet* charSet = INTL_charset_lookup(tdbb, value->getCharSet());
|
||||
|
||||
const FB_UINT64 byte_offset = offset * charSet->maxBytesPerChar();
|
||||
const FB_UINT64 byte_length = length * charSet->maxBytesPerChar();
|
||||
const FB_UINT64 byte_offset = FB_UINT64(offset) * charSet->maxBytesPerChar();
|
||||
const FB_UINT64 byte_length = FB_UINT64(length) * charSet->maxBytesPerChar();
|
||||
|
||||
if (charSet->isMultiByte())
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user