mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-07 22:44:49 +00:00
ICU-1008 Fix memory leak in ISO-2022 SafeClone
X-SVN-Rev: 5690
This commit is contained in:
parent
a118536e31
commit
eada9047be
1 changed files with 6 additions and 2 deletions
|
@ -951,7 +951,7 @@ T_UConverter_getNextUChar_ISO_2022(UConverterToUnicodeArgs* args,
|
|||
return 0xffff;
|
||||
}
|
||||
|
||||
do{
|
||||
while(1){
|
||||
|
||||
mySourceLimit = getEndOfBuffer_2022(&(args->source), args->sourceLimit, TRUE);
|
||||
/*Find the end of the buffer e.g : Next Escape Seq | end of Buffer*/
|
||||
|
@ -973,7 +973,11 @@ T_UConverter_getNextUChar_ISO_2022(UConverterToUnicodeArgs* args,
|
|||
ISO_2022,
|
||||
&plane,
|
||||
err);
|
||||
}while(args->source < args->sourceLimit);
|
||||
if(args->source >= args->sourceLimit){
|
||||
*err = U_INDEX_OUTOFBOUNDS_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( (args->source == args->sourceLimit) && args->flush){
|
||||
_ISO2022Reset(args->converter,UCNV_RESET_TO_UNICODE);
|
||||
|
|
Loading…
Add table
Reference in a new issue