Fix odd length long names
Submitted by: dufault@hda.com also Obtained from: 1.1.5.1
This commit is contained in:
parent
763424fcf0
commit
632a24451c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=5132
@ -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);
|
||||
|
@ -126,10 +126,8 @@ int
|
||||
compare(dest)
|
||||
char *dest;
|
||||
{
|
||||
|
||||
if (options & AR_TR)
|
||||
return (!strncmp(chdr.name, rname(dest), OLDARMAXNAME));
|
||||
return (!strcmp(chdr.name, rname(dest)));
|
||||
int maxname = (options & AR_TR) ? OLDARMAXNAME : MAXNAMLEN;
|
||||
return (!strncmp(chdr.name, rname(dest), maxname));
|
||||
}
|
||||
|
||||
void
|
||||
|
Loading…
Reference in New Issue
Block a user