#1494 closed defect (duplicate)

DOSFS lseek extends file on seek past end

Reported by: Chris Johns Owned by: Joel Sherrill
Priority: normal Milestone: 4.10
Component: fs Version: 4.10
Severity: normal Keywords:
Cc: nbkolchin@… Blocked By:
Blocking:

Description

The DOSFS extends a file on a seek past the end of a file. The SUS states in the
lseek page:

"The lseek() function shall not, by itself, extend the size of a file."

The file shall only be extended when a write occurs with the file at this
position. An lseek past the end of a file should return EOF.

There is also another bug. If a file is opened as read only then lseek is
called past the end of the file the file will be extended.

Change History (2)

comment:1 Changed on Apr 20, 2010 at 1:34:50 PM by Nickolay Semyonov-Kolchin

Cc: Nickolay Semyonov-Kolchin added

comment:2 Changed on Apr 20, 2010 at 10:56:53 PM by Chris Johns

Resolution: duplicate
Status: newclosed

The existing bug has code.

Note: See TracTickets for help on using tickets.