Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site cmcl2.UUCP
Path: utzoo!linus!philabs!cmcl2!salkind
From: salkind@cmcl2.UUCP (Lou Salkind)
Newsgroups: net.bugs.4bsd
Subject: ar bug
Message-ID: <2173@cmcl2.UUCP>
Date: Mon, 13-Feb-84 13:17:15 EST
Article-I.D.: cmcl2.2173
Posted: Mon Feb 13 13:17:15 1984
Date-Received: Wed, 15-Feb-84 00:22:22 EST
Organization: New York University
Lines: 23

Subject: ar bug
Index:	bin/ar.c 4.2BSD

Description:
	If you try to archive a file with a uid or gid greater than
	32K, ar will fail when you try to read the archive back in.
	You will get the message "Malformed archive."
Repeat-By:
	mkdir f
	chgrp 50000 f
	cd f
	cp /etc/passwd f
	ar r f.a passwd
	ar t f.a
Fix:
	When the file header is written out, cast the uid and gid to an
	unsigned short.  "diff ar.c.dist ar.c" follows:
510,511c510,511
< 	   stbuf.st_uid,
< 	   stbuf.st_gid,
---
> 	   (u_short)stbuf.st_uid,
> 	   (u_short)stbuf.st_gid,