Bug 82 - ranlib broke for odd-length long filenames at end of archive
Summary: ranlib broke for odd-length long filenames at end of archive
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: FreeBSD Core Team
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1994-12-23 05:00 UTC by Peter Dufault
Modified: 1994-12-23 05:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Dufault 1994-12-23 05:00:00 UTC
ranlib breaks on long odd-length filenames when the file is the last one in
the archive.  The bug is in ar/archive.c:copy_ar.

Fix: 

I don't have time to find it now.  I will look into it later; maybe
someone else has time to track it down now.
How-To-Repeat: 
Try this script:
#!/bin/csh
set F=0123456789ABCDE

cp /dev/null ${F}.c
cc -c ${F}.c
rm -f libfoo.a
ar cq libfoo.a ${F}.o
ranlib libfoo.a

rm -f ${F}.c ${F}.o
Comment 1 Garrett Wollman freebsd_committer freebsd_triage 1995-01-12 22:24:41 UTC
State Changed
From-To: open->closed

Nate's changes supposedly fixed this problem.