[haiku-development] reading/writing negative positions

  • From: Marcus Overhagen <marcusoverhagen@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Mon, 30 Jul 2007 14:40:35 +0200 (CEST)

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?

regards
Marcus






Viel oder wenig? Schnell oder langsam? Unbegrenzt surfen + telefonieren
ohne Zeit- und Volumenbegrenzung? DAS TOP ANGEBOT FÜR ALLE NEUEINSTEIGER
Jetzt bei Arcor: günstig und schnell mit DSL - das All-Inclusive-Paket
für clevere Doppel-Sparer, nur  34,95 ?  inkl. DSL- und ISDN-Grundgebühr!
http://www.arcor.de/rd/emf-dsl-2

Other related posts: