diff options
author | Roland McGrath <roland@redhat.com> | 1992-08-14 16:37:50 +0000 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 1992-08-14 16:37:50 +0000 |
commit | 781ce7f4a8720515cce8e93db9145434b7bb515d (patch) | |
tree | 461ca0fd30b3f708c19136ca60254fb10dd3a5d0 /arscan.c | |
parent | c76d6785dee8fc1accd2ab94a3194acc67efdbe8 (diff) | |
download | gunmake-781ce7f4a8720515cce8e93db9145434b7bb515d.tar.gz |
Formerly arscan.c.~25~
Diffstat (limited to 'arscan.c')
-rw-r--r-- | arscan.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -308,12 +308,16 @@ ar_name_equal (name, mem) namelen = strlen (name); memlen = strlen (mem); + if (namelen > memlen && memlen >= max - 1 && name[namelen - 2] == '.' && name[namelen - 1] == 'o' && mem[memlen - 2] == '.' && mem[memlen - 1] == 'o') return 1; - return !strcmp (name + max - 3, mem + max - 3); + if (namelen != memlen) + return 0; + + return (namelen < max - 3 || !strcmp (name + max - 3, mem + max - 3)); } #else /* AIX or APOLLO. */ |