Fix an off-by-one error where we try to split a path name that's
more than 100 characters long and the 101th last character is a '/'. MFC after: 3 weeks
This commit is contained in:
parent
37b3715cdb
commit
f77b6c6a25
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=211864
@ -1095,7 +1095,7 @@ name_split(char *name, int len)
|
|||||||
* to find the biggest piece to fit in the name field (or the smallest
|
* to find the biggest piece to fit in the name field (or the smallest
|
||||||
* prefix we can find)
|
* prefix we can find)
|
||||||
*/
|
*/
|
||||||
start = name + len - TNMSZ - 1;
|
start = name + len - TNMSZ;
|
||||||
while ((*start != '\0') && (*start != '/'))
|
while ((*start != '\0') && (*start != '/'))
|
||||||
++start;
|
++start;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user