summaryrefslogtreecommitdiffstats
path: root/usr.bin/ar/archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/ar/archive.c')
-rw-r--r--usr.bin/ar/archive.c3
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);
OpenPOWER on IntegriCloud