Fix a typo that accessing to the out of array
This commit is contained in:
parent
cef2b50c66
commit
5ea3118ad6
|
@ -1193,7 +1193,7 @@ FcStrSetAddLangs (FcStrSet *strs, const char *languages)
|
||||||
while ((next = strchr (p, ':')))
|
while ((next = strchr (p, ':')))
|
||||||
{
|
{
|
||||||
len = next - p;
|
len = next - p;
|
||||||
len = FC_MIN (len, 128);
|
len = FC_MIN (len, 127);
|
||||||
strncpy ((char *) lang, p, len);
|
strncpy ((char *) lang, p, len);
|
||||||
lang[len] = 0;
|
lang[len] = 0;
|
||||||
/* ignore an empty item */
|
/* ignore an empty item */
|
||||||
|
|
Loading…
Reference in New Issue