ICU-2135 Fixed the case where u_uastrncpy would read one past the end of the array.
X-SVN-Rev: 9799
This commit is contained in:
parent
99641b2420
commit
5b453f0ece
@ -763,7 +763,7 @@ static int32_t u_astrnlen(const char *s1, int32_t n)
|
||||
|
||||
if (s1)
|
||||
{
|
||||
while (*(s1++) && n--)
|
||||
while (n-- && *(s1++))
|
||||
{
|
||||
len++;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user