Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  8 Jan 2000 01:51:30 -0800 (PST)
From:      klh@netcom.com
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/15981: rcp -p fails when times have high bit set
Message-ID:  <20000108095130.12CCB15207@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000108095130.12CCB15207>