From owner-freebsd-bugs Thu Aug 7 14:10:06 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA01268 for bugs-outgoing; Thu, 7 Aug 1997 14:10:06 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA01262; Thu, 7 Aug 1997 14:10:03 -0700 (PDT) Resent-Date: Thu, 7 Aug 1997 14:10:03 -0700 (PDT) Resent-Message-Id: <199708072110.OAA01262@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, gnat@frii.com Received: from himalia.frii.com (himalia.frii.com [208.146.240.8]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA01088 for ; Thu, 7 Aug 1997 14:05:42 -0700 (PDT) Received: (from gnat@localhost) by himalia.frii.com (8.8.5/8.7.3) id OAA28841; Thu, 7 Aug 1997 14:57:43 -0600 (MDT) Message-Id: <199708072057.OAA28841@himalia.frii.com> Date: Thu, 7 Aug 1997 14:57:43 -0600 (MDT) From: gnat@frii.com Reply-To: gnat@frii.com To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: bin/4246: /usr/sbin/quot isn't 64-bit off_t clean Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4246 >Category: bin >Synopsis: /usr/sbin/quot isn't 64-bit off_t clean >Confidential: no >Severity: serious >Priority: high >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 7 14:10:01 PDT 1997 >Last-Modified: >Originator: Nathan Torkington >Organization: Interchangeable Antipodeans, Inc. >Release: FreeBSD 2.2.2-RELEASE i386 >Environment: Found in FreeBSD 2.2.2. >Description: /usr/sbin/quot calls lseek() without casting the offset to off_t. This makes breakage on filesystems where the offset is > 2**31. >How-To-Repeat: Use quot on a big filesystem (4gig?). >Fix: gnat@himalia (quot) diff quot.c new-quot.c 97,98c97 < if (lseek(fd,ino_to_fsba(super,last) << super->fs_fshift,0) < 0 < || read(fd,ip,INOSZ(super)) != INOSZ(super)) { --- > if (lseek(fd,(off_t) ino_to_fsba(super,last) << super->fs_fshift,0) < (off_t)0 || read(fd,ip,INOSZ(super)) != INOSZ(super)) { >Audit-Trail: >Unformatted: