]> git.saurik.com Git - apple/libc.git/blame - stdio/FreeBSD/fclose.c.patch
Libc-498.1.5.tar.gz
[apple/libc.git] / stdio / FreeBSD / fclose.c.patch
CommitLineData
224c7076
A
1Index: fclose.c
2===================================================================
3RCS file: /cvs/root/Libc/stdio/FreeBSD/fclose.c,v
4retrieving revision 1.2
5diff -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);