diff options
author | ache <ache@FreeBSD.org> | 1994-12-17 05:59:33 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 1994-12-17 05:59:33 +0000 |
commit | 615440cdedfc39ddc3e7a02e3f02ffbaf0427b70 (patch) | |
tree | 764a2db659f330852b5cd1d739919252964e1a91 /usr.bin/ar/archive.c | |
parent | 18911700cc959aae21b22c88e41b67c3a7d2000f (diff) | |
download | FreeBSD-src-615440cdedfc39ddc3e7a02e3f02ffbaf0427b70.zip FreeBSD-src-615440cdedfc39ddc3e7a02e3f02ffbaf0427b70.tar.gz |
Fix odd length long names
Submitted by: dufault@hda.com
also Obtained from: 1.1.5.1
Diffstat (limited to 'usr.bin/ar/archive.c')
-rw-r--r-- | usr.bin/ar/archive.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ar/archive.c b/usr.bin/ar/archive.c index 2d31b2f..8a6fe2f 100644 --- a/usr.bin/ar/archive.c +++ b/usr.bin/ar/archive.c @@ -299,7 +299,8 @@ copy_ar(cfp, size) error(cfp->rname); } - if (cfp->flags & RPAD && size & 1 && (nr = read(from, buf, 1)) != 1) { + if (cfp->flags & RPAD && (size + chdr.lname) & 1 && + (nr = read(from, buf, 1)) != 1) { if (nr == 0) badfmt(); error(cfp->rname); |