msvcrt: Be less strict while parsing file open mode in fopen function.

This commit is contained in:
Piotr Caban 2013-01-14 10:24:18 +01:00 committed by Alexandre Julliard
parent fc8dfe60ea
commit 5515170d13
1 changed files with 4 additions and 0 deletions

View File

@ -1263,6 +1263,8 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st
TRACE("%s\n", debugstr_w(mode));
while(*mode == ' ') mode++;
switch(*mode++)
{
case 'R': case 'r':
@ -1301,6 +1303,8 @@ static int msvcrt_get_flags(const MSVCRT_wchar_t* mode, int *open_flags, int* st
break;
case '+':
case ' ':
case 'a':
case 'w':
break;
default:
MSVCRT_INVALID_PMT(0, MSVCRT_EINVAL);