Date: Thu, 7 Aug 1997 14:57:43 -0600 (MDT) From: gnat@frii.com To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: bin/4246: /usr/sbin/quot isn't 64-bit off_t clean Message-ID: <199708072057.OAA28841@himalia.frii.com> Resent-Message-ID: <199708072110.OAA01262@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199708072057.OAA28841>