From owner-freebsd-bugs Fri Nov 14 11:20:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA24775 for bugs-outgoing; Fri, 14 Nov 1997 11:20:05 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: (from gnats@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA24742; Fri, 14 Nov 1997 11:20:02 -0800 (PST) (envelope-from gnats) Resent-Date: Fri, 14 Nov 1997 11:20:02 -0800 (PST) Resent-Message-Id: <199711141920.LAA24742@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, rich@math.missouri.edu Received: (from nobody@localhost) by hub.freebsd.org (8.8.7/8.8.7) id LAA24144; Fri, 14 Nov 1997 11:12:08 -0800 (PST) (envelope-from nobody) Message-Id: <199711141912.LAA24144@hub.freebsd.org> Date: Fri, 14 Nov 1997 11:12:08 -0800 (PST) From: rich@math.missouri.edu To: freebsd-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: www-1.0 Subject: i386/5044: Linux emul: Missing offset assignment in linux_truncate function Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 5044 >Category: i386 >Synopsis: Linux emul: Missing offset assignment in linux_truncate function >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Nov 14 11:20:01 PST 1997 >Last-Modified: >Originator: Richard Winkel >Organization: Univ of Missouri >Release: 2.2.5 >Environment: FreeBSD lisa.math.missouri.edu 2.2.5-STABLE FreeBSD 2.2.5-STABLE #0: Thu Nov 6 13:47:01 CST 1997 root@:/usr/src/sys/compile/g6_200_1 i386 >Description: Linux function "linux_truncate" forgets to assign callers offset argument to bsd "otruncate" argument. Results in a random offset, which adds MB's of nulls to the end of the affected file. >How-To-Repeat: Problem is triggered by linux port of mathematica. All file saves results in huge files which consist of the actual data followed by MB's of nulls. >Fix: At bottom of /usr/src/sys/i386/linux/linux_file.c, insert one line: bsd.path = args->path; bsd.length = args->length; /* this is the fix */ return otruncate(p, &bsd, retval); >Audit-Trail: >Unformatted: