From owner-freebsd-bugs Mon Jul 2 5: 0:13 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 97BCB37B406 for ; Mon, 2 Jul 2001 05:00:07 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f62C07E39666; Mon, 2 Jul 2001 05:00:07 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C178E37B407 for ; Mon, 2 Jul 2001 04:57:12 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.3/8.11.3) id f62BvCR39420; Mon, 2 Jul 2001 04:57:12 -0700 (PDT) (envelope-from nobody) Message-Id: <200107021157.f62BvCR39420@freefall.freebsd.org> Date: Mon, 2 Jul 2001 04:57:12 -0700 (PDT) From: Chris Myers To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/28629: ftpd REST command does not support restarting files at >2^31 bytes (2GB) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 28629 >Category: misc >Synopsis: ftpd REST command does not support restarting files at >2^31 bytes (2GB) >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 02 05:00:06 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Chris Myers >Release: 4.3-RELEASE >Organization: Networks By Design >Environment: FreeBSD connected.by-design.net 4.3-RELEASE FreeBSD 4.3-RELEASE #0: Sat Apr 21 10:54:49 GMT 2001 jkh@narf.osd.bsdi.com:/usr/src/sys/compile/GENERIC i386 >Description: The restart (REST) command does not properly support large (>2GB) files. If the restart point is greater than (2^31)-1 bytes, it will be set to (2^31)-1 and a "success" return code will be given to the FTP client program. The result is that if a user attempts to restart an FTP at the 2GB point or higher, the file will be corrupted. >How-To-Repeat: telnet localhost ftp user pass rest 3000000000 >Fix: The restart location in ftpd.c is (correctly) an off_t (a uint_64). In ftpcmd.y, it is a signed int. Change the parameter to REST from type int to type string and use strtoll() to convert it to a uint_64. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message