[haiku-development] Re: reading/writing negative positions
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Mon, 30 Jul 2007 15:00:45 +0200 (MEST)
On Mon, 30 Jul 2007, Marcus Overhagen wrote:
Hi,
I noticed that neither fd.c nor vfs.cpp do anything to prevent read and write
calls at positions < 0.
However, file_seek doesn't support negative positions and will return an error.
The read/write calls get through into the file system or raw device.
Wouldn't it be better to validate the position inside fd.c instead of passing
them to the lower layers?
Definitely. Feel free to do that or create a trac ticket, please.
CU, Ingo
- Follow-Ups:
- [haiku-development] Re: reading/writing negative positions
- From: Jérôme Duval
- References:
- [haiku-development] reading/writing negative positions
- From: Marcus Overhagen
Other related posts:
- » [haiku-development] reading/writing negative positions
- » [haiku-development] Re: reading/writing negative positions
- » [haiku-development] Re: reading/writing negative positions
- » [haiku-development] Re: reading/writing negative positions
Hi, I noticed that neither fd.c nor vfs.cpp do anything to prevent read and write calls at positions < 0. However, file_seek doesn't support negative positions and will return an error. The read/write calls get through into the file system or raw device. Wouldn't it be better to validate the position inside fd.c instead of passing them to the lower layers?
- [haiku-development] Re: reading/writing negative positions
- From: Jérôme Duval
- [haiku-development] reading/writing negative positions
- From: Marcus Overhagen