From f77b6c6a25e69047d8191baed596f0f2244041ff Mon Sep 17 00:00:00 2001 From: Brian Somers Date: Fri, 27 Aug 2010 08:54:40 +0000 Subject: [PATCH] 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 --- bin/pax/tar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/pax/tar.c b/bin/pax/tar.c index ab5bd3b12ad5..e274df47cf7a 100644 --- a/bin/pax/tar.c +++ b/bin/pax/tar.c @@ -1095,7 +1095,7 @@ name_split(char *name, int len) * to find the biggest piece to fit in the name field (or the smallest * prefix we can find) */ - start = name + len - TNMSZ - 1; + start = name + len - TNMSZ; while ((*start != '\0') && (*start != '/')) ++start;