]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Certain filenames between 245 and 255 characters long would cause an
authorkientzle <kientzle@FreeBSD.org>
Sat, 23 Apr 2005 17:46:51 +0000 (17:46 +0000)
committerkientzle <kientzle@FreeBSD.org>
Sat, 23 Apr 2005 17:46:51 +0000 (17:46 +0000)
commit5be5ef99a1a65426e3fb8f581e36ff43adddf0c4
tree8197244b8e93b9504e38cd431c08ba48084b5e2b
parent2d0fba3d59787d94a442d9c1274e9096428ec2ee
Certain filenames between 245 and 255 characters long would cause an
internal error if pax extended attributes were being generated.  Being
< 255 characters, the first-pass path editing (to generate a
ustar-compatible name for the main entry) wouldn't occur, and the
second-pass path editing (to generate a ustar name for the pax
attributes entry) assumed the input was already < 245 chars.

The core problem here was using an abbreviated algorithm for the
second pass that relied on the first pass having already run.  The
rewritten code is much simpler: It just uses the full path-shortening
algorithm for building both ustar pathnames.  This way, the second
ustar pathname will always be short enough.

Thanks to: Mark Cammidge
Related to: bin/74385
lib/libarchive/archive_write_set_format_pax.c