diff options
author | brian <brian@FreeBSD.org> | 2010-08-29 11:56:56 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2010-08-29 11:56:56 +0000 |
commit | a8d67237e01bdd6792c4afd32cb56aed6030bbba (patch) | |
tree | d627b6ee1647bb2a156585082c4357c0e4cad0ee /bin/pax/tar.c | |
parent | 9112be80d82f5c839a88cf13631c36faca3a85a4 (diff) | |
download | FreeBSD-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.c | 2 |
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); /* |