ICU-2135 Fixed the case where u_austrncpy would read one past the end of the array.
X-SVN-Rev: 9795
This commit is contained in:
parent
20cd470111
commit
fe09a02ac7
@ -835,7 +835,7 @@ static int32_t u_ustrnlen(const UChar *ucs1, int32_t n)
|
||||
|
||||
if (ucs1)
|
||||
{
|
||||
while (*(ucs1++) && n--)
|
||||
while (n-- && *(ucs1++))
|
||||
{
|
||||
len++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user