lkml.org 
[lkml]   [2000]   [Jul]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: fclose() again
On Fri, 14 Jul 2000, Evan Langlois wrote:

> Well, according to the man page, fclose() should return EBADF if the passed
> argument is not an open stream. No where does it say that it segfaults, and
> the I don't see when it returns EBADF instead of segfaulting.

Stream is defines as an struct you get from fopen() and relatives. Feeding
it some random data isn't considered a valid steam.

Patch the programs that do it that way, the're broken.

> I think the library might need to be patched, wherever it is segfaulting.

No. The program needs to be patched.

> ***** quote ************
> ** fclose requires a valid FILE object pointer, and NULL isn't among them.
> ** Case closed.
> **
> ** Andreas.



Igmar


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

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