ICU-11298 fix crash happening when the first non-comment line in BidiTest.txt is ill formed. Method printErrorLine seeks to print paraLevelName, which has not been initialized and is NULL.

The fix is to initialize paraLevelName to "N/A" at the beginning of method TestBidiTest().

X-SVN-Rev: 36564
This commit is contained in:
Matitiahu Allouche 2014-09-23 20:29:55 +00:00
parent 435efa6541
commit 00aa5b56c4

View File

@ -280,6 +280,8 @@ void BiDiConformanceTest::TestBidiTest() {
levelsCount=0;
orderingCount=0;
errorCount=0;
// paraLevelName must be initialized in case the first non-comment line is in error
paraLevelName="N/A";
while(errorCount<10 && fgets(line, (int)sizeof(line), bidiTestFile.getAlias())!=NULL) {
++lineNumber;
// Remove trailing comments and whitespace.