From owner-freebsd-bugs Sat Jan 8 2: 0: 5 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id EC0F015269 for ; Sat, 8 Jan 2000 02:00:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id CAA69352; Sat, 8 Jan 2000 02:00:01 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: by hub.freebsd.org (Postfix, from userid 32767) id 12CCB15207; Sat, 8 Jan 2000 01:51:30 -0800 (PST) Message-Id: <20000108095130.12CCB15207@hub.freebsd.org> Date: Sat, 8 Jan 2000 01:51:30 -0800 (PST) From: klh@netcom.com To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: bin/15981: rcp -p fails when times have high bit set Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 15981 >Category: bin >Synopsis: rcp -p fails when times have high bit set >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Jan 8 02:00:01 PST 2000 >Closed-Date: >Last-Modified: >Originator: Ken Harrenstien >Release: 3.3 >Organization: >Environment: n/a >Description: This code fragment should be using %ul instead of %ld for both fields. if (pflag) { (void)snprintf(path, sizeof(path), "T%ld 0 %ld 0\n", (long)statp->st_mtimespec.tv_sec, (long)statp->st_atimespec.tv_sec); (void)write(rem, path, strlen(path)); >How-To-Repeat: Create a file with a st_mtime that has the high bit set. Attempt to copy it with "rcp -p foo target:." where target is a 64-bit system such as an Alpha (running D/U in this case). Will fail with a "mtime.sec not delimited" screwup message due to presence of a minus sign. However, it should not be necessary to reproduce this to realize that the given code fragment is a time bomb, so to speak... >Fix: >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message