OSDN Git Service

toybox: tar: Fix support for long names
authorTom Marshall <tdm@cyngn.com>
Wed, 10 Feb 2016 05:01:41 +0000 (00:01 -0500)
committerTom Marshall <tdm@cyngn.com>
Wed, 10 Feb 2016 05:15:27 +0000 (21:15 -0800)
commit40128c415042f6d3bc52f46612cdbba1e7be3067
tree446243d4904694df2fc160a634e711e088cb3d87
parent554eccb34b19619d1119b78bee03aca246e049eb
toybox: tar: Fix support for long names

Pathnames may be longer than the name field in the header, so use
strncpy() instead of xstrncpy() to avoid bailing out.

Also add unit tests to ensure proper handling of short and long
pathnames.

Change-Id: Id025891993746889564b479e5185cf9721b54a55
tests/tar.test
toys/pending/tar.c