aboutsummaryrefslogtreecommitdiff
path: root/bin/pax/tar.c
diff options
context:
space:
mode:
authorBrian Somers <brian@FreeBSD.org>2010-08-29 11:56:56 +0000
committerBrian Somers <brian@FreeBSD.org>2010-08-29 11:56:56 +0000
commitcd14b457565dfc1669c2e598ddc0b3e4bdd3f429 (patch)
treed627b6ee1647bb2a156585082c4357c0e4cad0ee /bin/pax/tar.c
parentb2d89ed701b83a173b01f7b479adb7df4c1d7d53 (diff)
downloadsrc-cd14b457565dfc1669c2e598ddc0b3e4bdd3f429.tar.gz
src-cd14b457565dfc1669c2e598ddc0b3e4bdd3f429.zip
Correct an out-by-one error when earlying out ustar filenames that
are too long. Filenames escaping this test are caught later on, so the bug doesn't cause any breakage. Document the correct ustar limitations in pax. As I have no access to the IEEE 1003.2 spec, I can only assume that the limitations imposed are in fact correct. Add regression tests for the filename limitations imposed by pax. MFC after: 3 weeks
Notes
Notes: svn path=/head/; revision=211963
Diffstat (limited to 'bin/pax/tar.c')
-rw-r--r--bin/pax/tar.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/pax/tar.c b/bin/pax/tar.c
index e274df47cf7a..05e8be57ee55 100644
--- a/bin/pax/tar.c
+++ b/bin/pax/tar.c
@@ -1086,7 +1086,7 @@ name_split(char *name, int len)
*/
if (len <= TNMSZ)
return(name);
- if (len > (TPFSZ + TNMSZ + 1))
+ if (len > TPFSZ + TNMSZ)
return(NULL);
/*