Restore use of strncpy(), as there is later unconditional termination
of the string, and reliance on the returned pointer. Found by: bde (tm)
This commit is contained in:
parent
2fd8d3d84e
commit
d2042d2052
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=154429
@ -72,7 +72,7 @@ parse_lt(const char * str)
|
||||
char buf[64];
|
||||
|
||||
/* Make local copy and force lowercase to simplify parsing */
|
||||
p = strlcpy(buf, str, sizeof buf);
|
||||
p = strncpy(buf, str, sizeof buf);
|
||||
buf[sizeof buf - 1] = '\0';
|
||||
for (i = 0; buf[i]; i++)
|
||||
buf[i] = (char)tolower(buf[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user