summaryrefslogtreecommitdiffstats
path: root/bin/pax/tar.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2010-08-29 11:56:56 +0000
committerbrian <brian@FreeBSD.org>2010-08-29 11:56:56 +0000
commita8d67237e01bdd6792c4afd32cb56aed6030bbba (patch)
treed627b6ee1647bb2a156585082c4357c0e4cad0ee /bin/pax/tar.c
parent9112be80d82f5c839a88cf13631c36faca3a85a4 (diff)
downloadFreeBSD-src-a8d67237e01bdd6792c4afd32cb56aed6030bbba.zip
FreeBSD-src-a8d67237e01bdd6792c4afd32cb56aed6030bbba.tar.gz
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
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 e274df4..05e8be5 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);
/*
OpenPOWER on IntegriCloud