mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 00:43:32 +00:00
ICU-1878 fix for crash of ISO-2022-CN converter on illegal input
X-SVN-Rev: 9474
This commit is contained in:
parent
e8e92374d6
commit
7ca01d0e0b
1 changed files with 6 additions and 1 deletions
|
@ -3136,7 +3136,12 @@ UConverter_toUnicode_ISO_2022_CN_OFFSETS_LOGIC(UConverterToUnicodeArgs *args,
|
|||
mySourceChar+= (uint32_t) args->converter->toUnicodeStatus<<8;
|
||||
args->converter->toUnicodeStatus = 0;
|
||||
pBuf = tempBuf;
|
||||
targetUniChar = _MBCSSimpleGetNextUChar(myData->currentConverter->sharedData, &pBuf, tempLimit, FALSE);
|
||||
if(myData->currentConverter!=NULL){
|
||||
targetUniChar = _MBCSSimpleGetNextUChar(myData->currentConverter->sharedData, &pBuf, tempLimit, FALSE);
|
||||
}else{
|
||||
*err=U_INVALID_CHAR_FOUND;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else{
|
||||
|
|
Loading…
Add table
Reference in a new issue