Date: Fri, 11 Apr 2003 01:37:41 +0200 (CEST) From: Erdgeist <erdgeist@erdgeist.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: misc/50825: lseek to negative file positions screws up flags Message-ID: <200304102337.h3ANbfWe001002@mail.gate5.de> Resent-Message-ID: <200304111550.h3BFoGCc022111@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 50825
>Category: misc
>Synopsis: lseek to negative file positions screws up flags
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Apr 11 08:50:16 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator: Erdgeist
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
erdgeist.org
>Environment:
System: FreeBSD bauklotz.gate5.de 5.0-CURRENT FreeBSD 5.0-CURRENT #3: Thu Apr 10 20:53:26 CEST 2003 root@bauklotz.gate5.de:/usr/obj/usr/src/sys/bauklotz i386
>Description:
Doing a lseek to a position before the file results in corrupted
File flags.
>How-To-Repeat:
#include <unistd.h>
#include <fcntl.h>
int main( ) {
int a = open( "testfile", O_CREAT | O_RDWR );
lseek( a, -10, SEEK_CUR);
close( a );
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304102337.h3ANbfWe001002>
