From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,92ab264d62bc73cf,start X-Google-Attributes: gidfee84,public From: moore+@moore.fac.cs.cmu.edu (Dale Moore) Subject: Digital Unix /usr/bin/ar big uid bug Date: 1997/02/06 Message-ID: <5dd7eg$7gh@cantaloupe.srv.cs.cmu.edu>#1/1 X-Deja-AN: 214900313 organization: Carnegie Mellon University newsgroups: comp.unix.osf.osf1 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