diff options
author | harti <harti@FreeBSD.org> | 2005-03-03 10:46:23 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2005-03-03 10:46:23 +0000 |
commit | bed0867bba953572a2ce524b670548c8b76b7698 (patch) | |
tree | f028f90eb9dc7b914cf86d99222e0b9c52825efc /usr.bin/make/arch.c | |
parent | e40b6c387575a6f387af914fe8aaf548fab21ea4 (diff) | |
download | FreeBSD-src-bed0867bba953572a2ce524b670548c8b76b7698.zip FreeBSD-src-bed0867bba953572a2ce524b670548c8b76b7698.tar.gz |
Fix parsing of archives: in System V archive format the member names
is terminated with a slash. Although we are not System V, ar has
been configured to put that slash in. This format allows filenames
with trailing spaces.
Diffstat (limited to 'usr.bin/make/arch.c')
-rw-r--r-- | usr.bin/make/arch.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/make/arch.c b/usr.bin/make/arch.c index 8276fbb..2565c07 100644 --- a/usr.bin/make/arch.c +++ b/usr.bin/make/arch.c @@ -516,10 +516,12 @@ ArchFindMember(const char *archive, const char *member, struct ar_hdr *arhPtr, * prefixes. Names are space-padded to the right, so if * the character in 'name' at the end of the matched * string is anything but a space, this isn't the - * member we sought. + * member we sought. Additionally there may be a + * slash at the end of the name (System 5 style). */ if (tlen != sizeof(arhPtr->ar_name) && - arhPtr->ar_name[tlen] != ' '){ + arhPtr->ar_name[tlen] != ' ' && + arhPtr->ar_name[tlen] != '/') { goto skip; } /* |