diff options
Diffstat (limited to 'StdLib/LibC/Stdio/setvbuf.c')
-rw-r--r-- | StdLib/LibC/Stdio/setvbuf.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/StdLib/LibC/Stdio/setvbuf.c b/StdLib/LibC/Stdio/setvbuf.c index 3ea96ff..9e01ea9 100644 --- a/StdLib/LibC/Stdio/setvbuf.c +++ b/StdLib/LibC/Stdio/setvbuf.c @@ -1,11 +1,11 @@ /** @file
Implementation of setvbuf as declared in <stdio.h>.
- Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available
under the terms and conditions of the BSD License that accompanies this
distribution. The full text of the license may be found at
- http://opensource.org/licenses/bsd-license.php.
+ http://opensource.org/licenses/bsd-license.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@@ -67,6 +67,10 @@ setvbuf(FILE *fp, char *buf, int mode, size_t size) _DIAGASSERT(fp != NULL);
/* buf may be NULL */
+ if(fp == NULL) {
+ errno = EINVAL;
+ return (EOF);
+ }
/*
* Verify arguments. The `int' limit on `size' is due to this
|