tar: fix and sanitize handling of long filenames/linknames

(GNU extensions 'K' and 'L').
We correctly handle them when untarring now, but unfortunately
we still don't use them when tarring! That stupid 100 char limit
is still there!
The biggest problem is that we don't support 'pax' tar format.
Linux kernel tarballs are in this format... shame
This commit is contained in:
Denis Vlasenko
2006-11-24 17:21:44 +00:00
parent d398ecab9d
commit d6772501db
3 changed files with 47 additions and 21 deletions

View File

@@ -74,6 +74,7 @@ char * xstrndup(const char *s, int n)
if (ENABLE_DEBUG && s == NULL)
bb_error_msg_and_die("xstrndup bug");
/* TODO: think about xstrndup("abc", 10000)!!! */
t = xmalloc(++n);
return safe_strncpy(t,s,n);