diff --git a/commands/pax/tar.c b/commands/pax/tar.c index f6861ded4..3ec4e6649 100644 --- a/commands/pax/tar.c +++ b/commands/pax/tar.c @@ -1094,6 +1094,11 @@ name_split(char *name, int len) * prefix we can find) */ start = name + len - TNMSZ - 1; + + /* Don't split at first '/'. */ + if (start == name && *start == '/') + ++start; + while ((*start != '\0') && (*start != '/')) ++start;