ICU-463 Put fix for pointer overflow back into code.
X-SVN-Rev: 2360
This commit is contained in:
parent
9e89664fa6
commit
16d67c3ebb
@ -2571,7 +2571,8 @@ UnicodeString::extract(UTextOffset start,
|
||||
int32_t length,
|
||||
char *dst,
|
||||
const char *codepage) const
|
||||
{return extract(start, length, dst, INT32_MAX, codepage);}
|
||||
// This dstSize value should prevent pointer overflow
|
||||
{return extract(start, length, dst, 0x0FFFFFFF, codepage);}
|
||||
|
||||
inline void
|
||||
UnicodeString::extractBetween(UTextOffset start,
|
||||
|
@ -1251,10 +1251,9 @@ UnicodeString::extract(UTextOffset start,
|
||||
|
||||
|
||||
/* Pin the limit to U_MAX_PTR. NULL check is for AS/400. */
|
||||
/* [grhoten] What sort of silly assumption is this? */
|
||||
/* if((myTargetLimit < myTarget) || (myTargetLimit == NULL)) {
|
||||
if((myTargetLimit < myTarget) || (myTargetLimit == NULL)) {
|
||||
myTargetLimit = (char*)U_MAX_PTR;
|
||||
}*/
|
||||
}
|
||||
|
||||
if (myTarget != NULL) {
|
||||
ucnv_fromUnicode(converter, &myTarget, myTargetLimit,
|
||||
|
Loading…
Reference in New Issue
Block a user