8 bit os_f handles
David J. Ruck
druck at freeuk.com
Fri Mar 31 18:01:22 BST 2000
On Fri 31 Mar, Daniel Ellis wrote:
> I must say you have a point here: one solution potentially causes
> writes to non-existent file handles, the other causes obscure memory
> corruption. I think there's no question that the latter is more
> dangerous.
No the former is far more dangerous!
Consider program A opens file handle 10, program B opens fie handle 266
(256+10), but uses OSLib's xosfind call so the file handle truncated to 8
bits when written back through the os_f pointer. Now program B writes to
program A's file.
Invalid assumtions such as os_f in something in as widespread use as OSLib
really spells the deathnell of the current RISC OS API. It will not be
possible to introduce key extensions to the filing system for general users
because of the risk of corruption from 3rd party programs linked with OSLib.
New features will have to be delayed until the new 32bit API is finalised,
when broken code will have to be fixed as part of the porting process, and
existing applications will sit behind a compatibility layer. This is means
a considerable delay.
---Dave
--
______________________________________________________________________
David J. Ruck Phone: 07974 108301 Email: druck at freeuk.com
______________________________________________________________________
More information about the oslib-user
mailing list