mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Use strlcpy() in !localized case to avoid the -1's.
This commit is contained in:
parent
0ea291e221
commit
f53577c0d4
1 changed files with 1 additions and 2 deletions
|
|
@ -51,8 +51,7 @@ strxfrm(char * __restrict dest, const char * __restrict src, size_t len)
|
|||
if (slen < len)
|
||||
strcpy(dest, src);
|
||||
else {
|
||||
strncpy(dest, src, len - 1);
|
||||
dest[len - 1] = '\0';
|
||||
strlcpy(dest, src, len);
|
||||
}
|
||||
}
|
||||
return slen;
|
||||
|
|
|
|||
Loading…
Reference in a new issue