Commit a5665693 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Always set fd to -1 in _sopen_s on failure.

parent 887a6832
......@@ -2185,6 +2185,9 @@ int CDECL MSVCRT__sopen_s( int *fd, const char *path, int oflags, int shflags, i
MSVCRT_wchar_t *pathW;
int ret;
if (!MSVCRT_CHECK_PMT(fd != NULL))
return MSVCRT_EINVAL;
*fd = -1;
if(!MSVCRT_CHECK_PMT(path && (pathW = msvcrt_wstrdupa(path))))
return MSVCRT_EINVAL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment