mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-16 02:07:15 +00:00
ICU-7039 Fix pointer integer comparison.
X-SVN-Rev: 26458
This commit is contained in:
parent
803387f796
commit
4ca1eed83e
1 changed files with 2 additions and 1 deletions
|
@ -4047,7 +4047,8 @@ UnicodeString::extract(int32_t start,
|
|||
|
||||
{
|
||||
// This dstSize value will be checked explicitly
|
||||
return extract(start, _length, dst, dst!=0 ? ((dst >= ((size_t)-1) - UINT32_MAX) ? (((char*)UINT32_MAX) - dst) : UINT32_MAX) : 0, codepage);
|
||||
// Ticket #7039: Clip length to the maximum valid length to the end of addressable memory given the starting address
|
||||
return extract(start, _length, dst, dst!=0 ? ((dst >= (char*)((size_t)-1) - UINT32_MAX) ? (((char*)UINT32_MAX) - dst) : UINT32_MAX) : 0, codepage);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue