]>
Commit | Line | Data |
---|---|---|
224c7076 A |
1 | Index: fclose.c |
2 | =================================================================== | |
3 | RCS file: /cvs/root/Libc/stdio/FreeBSD/fclose.c,v | |
4 | retrieving revision 1.2 | |
5 | diff -u -d -b -w -p -r1.2 fclose.c | |
6 | --- fclose.c 2003/05/20 22:22:40 1.2 | |
7 | +++ fclose.c 2005/02/14 21:57:28 | |
8 | @@ -53,6 +53,10 @@ fclose(FILE *fp) | |
9 | { | |
10 | int r; | |
11 | ||
12 | + if (fp == NULL) { | |
13 | + errno = EFAULT; | |
14 | + return (EOF); | |
15 | + } | |
16 | if (fp->_flags == 0) { /* not open! */ | |
17 | errno = EBADF; | |
18 | return (EOF); |