From: moore+@moore.fac.cs.cmu.edu (Dale Moore)
Subject: Digital Unix /usr/bin/ar big uid bug
Date: 1997/02/06 [thread overview]
Message-ID: <5dd7eg$7gh@cantaloupe.srv.cs.cmu.edu> (raw)
Short Version:
/usr/bin/ar barfs on UID's > 999,999
Long Version:
The format for archive files on Digital Unix is described in
the include file
/usr/include/ar.h
Inside the archive file are a collection of ".o" files.
The archive format allows for storing the name, owner,
and group of the original ".o" file. It stores the uid
as a 6 character ascii decimal representation. The
gid is handled in a similar fashion.
I suspect that the program "/usr/bin/ar" writes the file by
doing something like
printf("%-6u", uid);
Unfortunately, the control characters "%-6u" specifies that
the resulting string must be at least 6 characters long, perhaps
longer. It is this perhaps longer that I suspect tends to screw
things up. When the UID is greater than 999,999 we overflow
the 6 character array allocated to hold the uid field. This causes
subsequent output data to be offset by one or more bytes.
I would send this directly to a DEC software bug reporting
center, or software quality assurance center, but
I don't have a net address. If you could supply one
I would appreciate it.
As a workaround, we are using Gnu's binutil's ar program.
Even though Gnu's ar does not handle large uid's and gid's perfectly,
it does handle it better than DEC's ar program.
Dale Moore
Senior Research Systems Programmer
School of Computer Science
Carnegie Mellon University
next reply other threads:[~1997-02-06 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-02-06 5:00 Dale Moore [this message]
1997-02-10 5:00 ` Digital Unix /usr/bin/ar big uid bug Craig Neth USG
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox