From owner-freebsd-bugs Mon Sep 18 10:13:30 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id KAA23690 for bugs-outgoing; Mon, 18 Sep 1995 10:13:30 -0700 Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.34]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id KAA23667 for ; Mon, 18 Sep 1995 10:13:24 -0700 Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.9/8.6.9) id DAA01181; Tue, 19 Sep 1995 03:08:46 +1000 Date: Tue, 19 Sep 1995 03:08:46 +1000 From: Bruce Evans Message-Id: <199509181708.DAA01181@godzilla.zeta.org.au> To: bugs@freebsd.org, mikebo@tellab5 Subject: Re: 2.0.5R: Is there a BUG in "ar"? Sender: owner-bugs@freebsd.org Precedence: bulk ># ar x ../libc_pic.a >ar: ../libc_pic.a: Inappropriate file type or format `ar x' always fails on filenames with odd lengths >= 17. Try this fix. *** archive.c~ Wed May 31 19:51:24 1995 --- archive.c Sat Sep 16 02:27:28 1995 *************** *** 277,281 **** off_t size; { - int pad_odd_read; static char pad = '\n'; off_t sz; --- 277,280 ---- *************** *** 301,310 **** } ! if (already_written) ! pad_odd_read = (cfp->flags & RPAD) && ((size + chdr.lname) & 1); ! else ! pad_odd_read = (cfp->flags & RPAD) && (size & 1); ! ! if (pad_odd_read && (nr = read(from, buf, 1)) != 1) { if (nr == 0) badfmt(); --- 300,305 ---- } ! if (cfp->flags & RPAD && (size + chdr.lname) & 1 && ! (nr = read(from, buf, 1)) != 1) { if (nr == 0) badfmt(); Bruce