about summary refs log tree commit diff
path: root/libio/iofopncook.c
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2015-09-01 08:48:15 -0700
committerPaul Pluzhnikov <ppluzhnikov@google.com>2015-09-01 08:48:15 -0700
commit2d8e36e691f460aeeb3362fd44c71cafc7bb5852 (patch)
tree945a622e0b51a2e7ff758269a60a6d5ef1417479 /libio/iofopncook.c
parent74589f738efd72e07f759a4aabd2e32613aaefb8 (diff)
downloadglibc-2d8e36e691f460aeeb3362fd44c71cafc7bb5852.tar.gz
glibc-2d8e36e691f460aeeb3362fd44c71cafc7bb5852.tar.xz
glibc-2d8e36e691f460aeeb3362fd44c71cafc7bb5852.zip
Fix BZ #18757.
Diffstat (limited to 'libio/iofopncook.c')
-rw-r--r--libio/iofopncook.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libio/iofopncook.c b/libio/iofopncook.c
index b845d29657..978a7fa345 100644
--- a/libio/iofopncook.c
+++ b/libio/iofopncook.c
@@ -189,6 +189,7 @@ _IO_fopencookie (cookie, mode, io_functions)
       read_write = _IO_NO_READS|_IO_IS_APPENDING;
       break;
     default:
+      __set_errno (EINVAL);
       return NULL;
   }
   if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+'))