lkml.org 
[lkml]   [1997]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Write to a closed stream bug.
Hi!

> > be performed. It is entirely unacceptable for any function, whether
> > it is in a runtime-library, or is coded by an application, to
> > pretend that it performed some function that, in fact, it did not.
>
> try strcpy(0x12543456, 0x247375394)
>
> shock horror it crashes. You passed it a bad pointer. You did the
> same

It is ok - strcpy either copies memory, or raises SIGSEGV. That's
ok. It reported error.

About scaling: Yes, it is true that checking for this condition would
require one mov somewhere inn fclose. Do you think that this is an
issue?

And: It behaved incorrectly: you gave it some invalid handle. It did
not *write* anywhere. If you passed invalid handle, that was valid
enough for data to go *somewhere*, returning success would be
acceptable.

Pavel

--
I'm really pavel@atrey.karlin.mff.cuni.cz. Pavel
Look at http://atrey.karlin.mff.cuni.cz/~pavel/ ;-).

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:0.095 / U:0.708 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site