ICU-8361 Fix array overrun in Indic layout engine
X-SVN-Rev: 30478
This commit is contained in:
parent
c651458559
commit
900d537065
@ -1,6 +1,6 @@
|
||||
/*
|
||||
/ *
|
||||
* (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved
|
||||
* (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
|
||||
*
|
||||
*/
|
||||
|
||||
@ -241,7 +241,7 @@ public:
|
||||
le_uint32 saveAuxData = fGlyphStorage.getAuxData(i+inv_count,success);
|
||||
const SplitMatra *splitMatra = classTable->getSplitMatra(matraClass);
|
||||
int j;
|
||||
for (j = 0 ; *(splitMatra)[j] != 0 ; j++) {
|
||||
for (j = 0 ; j < SM_MAX_PIECES && *(splitMatra)[j] != 0 ; j++) {
|
||||
LEUnicode piece = (*splitMatra)[j];
|
||||
if ( j == 0 ) {
|
||||
fOutChars[i+inv_count] = piece;
|
||||
@ -332,7 +332,7 @@ public:
|
||||
const SplitMatra *splitMatra = classTable->getSplitMatra(matraClass);
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 3 && (*splitMatra)[i] != 0; i += 1) {
|
||||
for (i = 0; i < SM_MAX_PIECES && (*splitMatra)[i] != 0; i += 1) {
|
||||
LEUnicode piece = (*splitMatra)[i];
|
||||
IndicClassTable::CharClass pieceClass = classTable->getCharClass(piece);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
*
|
||||
* (C) Copyright IBM Corp. 1998-2009 - All Rights Reserved
|
||||
* (C) Copyright IBM Corp. 1998-2011 - All Rights Reserved
|
||||
*
|
||||
*/
|
||||
|
||||
@ -71,7 +71,9 @@ U_NAMESPACE_BEGIN
|
||||
#define SF_POST_BASE_LIMIT_MASK 0x0000FFFFU
|
||||
#define SF_NO_POST_BASE_LIMIT 0x00007FFFU
|
||||
|
||||
typedef LEUnicode SplitMatra[3];
|
||||
#define SM_MAX_PIECES 3
|
||||
|
||||
typedef LEUnicode SplitMatra[SM_MAX_PIECES];
|
||||
|
||||
class MPreFixups;
|
||||
class LEGlyphStorage;
|
||||
|
Loading…
Reference in New Issue
Block a user