Piotr Caban : msvcrt: Be less strict while parsing file open mode in fopen function.
Module: wine Branch: master Commit: 5515170d136dfd639b16b409434c5a182174315d URL: http://source.winehq.org/git/wine.git/?a=commit;h=5515170d136dfd639b16b40943... Author: Piotr Caban <piotr(a)codeweavers.com> Date: Mon Jan 14 10:24:18 2013 +0100 msvcrt: Be less strict while parsing file open mode in fopen function. --- dlls/msvcrt/file.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index 60af1a7..f0d0f7d 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -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);
participants (1)
-
Alexandre Julliard