[haiku-development] Re: reading/writing negative positions
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Mon, 30 Jul 2007 15:19:47 +0200 (MEST)
On Mon, 30 Jul 2007, Jérôme Duval wrote:
2007/7/30, Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>:
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.
Does it imply to check relative and absolute positions ?
In all cases but seeking you have only absolute positions. And those
should be checked for negative values as Marcus proposed.
BTW it should also fail for non seekable file systems.
Actually those should simply ignore the position argument.
CU, Ingo
- References:
- [haiku-development] reading/writing negative positions
- From: Marcus Overhagen
- [haiku-development] Re: reading/writing negative positions
- From: Ingo Weinhold
- [haiku-development] Re: reading/writing negative positions
- From: Jérôme Duval
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
2007/7/30, Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>:
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.
Does it imply to check relative and absolute positions ?
BTW it should also fail for non seekable file systems.
- [haiku-development] reading/writing negative positions
- From: Marcus Overhagen
- [haiku-development] Re: reading/writing negative positions
- From: Ingo Weinhold
- [haiku-development] Re: reading/writing negative positions
- From: Jérôme Duval