mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-08 15:05:53 +00:00
ICU-3718 Don't read before the array (Fix from Ram)
X-SVN-Rev: 15547
This commit is contained in:
parent
d47ca6208c
commit
b8b164bb73
1 changed files with 3 additions and 1 deletions
|
@ -402,7 +402,7 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
|
|||
}
|
||||
srcLength++;
|
||||
}
|
||||
}else{
|
||||
}else if(srcLength > 0){
|
||||
for(int32_t j=0; j<srcLength; j++){
|
||||
if(src[j]> 0x7f){
|
||||
srcIsASCII = FALSE;
|
||||
|
@ -414,6 +414,8 @@ _internal_toUnicode(const UChar* src, int32_t srcLength,
|
|||
failPos = j;
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(srcIsASCII == FALSE){
|
||||
|
|
Loading…
Add table
Reference in a new issue