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