This fixes a regression from 53a3686f0920f1dc2fba34691d8eb8094851d82e; at this point, _Stat->st_mode is uninitialized in these functions.
Signed-off-by: Martin Storsjö <mar...@martin.st> --- mingw-w64-crt/stdio/msvcr110pre_stat32.c | 2 +- mingw-w64-crt/stdio/msvcr110pre_stat64i32.c | 2 +- mingw-w64-crt/stdio/msvcr110pre_wstat32.c | 2 +- mingw-w64-crt/stdio/msvcr110pre_wstat64i32.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mingw-w64-crt/stdio/msvcr110pre_stat32.c b/mingw-w64-crt/stdio/msvcr110pre_stat32.c index 63d753e61..0d58f7b17 100644 --- a/mingw-w64-crt/stdio/msvcr110pre_stat32.c +++ b/mingw-w64-crt/stdio/msvcr110pre_stat32.c @@ -23,7 +23,7 @@ int __cdecl stat32(const char *_Filename, struct _stat32 *_Stat) if (_path == NULL && _Filename != NULL) return -1; int ret = _stat32i64(_path, &st); - ret = __mingw_fix_stat_finish(ret, _Filename, _path, _Stat->st_mode); + ret = __mingw_fix_stat_finish(ret, _Filename, _path, st.st_mode); if (ret != 0) return ret; if (st.st_size > UINT32_MAX) { diff --git a/mingw-w64-crt/stdio/msvcr110pre_stat64i32.c b/mingw-w64-crt/stdio/msvcr110pre_stat64i32.c index 6741c9b65..b2b037aea 100644 --- a/mingw-w64-crt/stdio/msvcr110pre_stat64i32.c +++ b/mingw-w64-crt/stdio/msvcr110pre_stat64i32.c @@ -23,7 +23,7 @@ int __cdecl stat64i32(const char *_Filename, struct _stat64i32 *_Stat) if (_path == NULL && _Filename != NULL) return -1; int ret = _stat64(_path, &st); - ret = __mingw_fix_stat_finish(ret, _Filename, _path, _Stat->st_mode); + ret = __mingw_fix_stat_finish(ret, _Filename, _path, st.st_mode); if (ret != 0) return ret; if (st.st_size > UINT32_MAX) { diff --git a/mingw-w64-crt/stdio/msvcr110pre_wstat32.c b/mingw-w64-crt/stdio/msvcr110pre_wstat32.c index 4e6c92299..b4af68e2b 100644 --- a/mingw-w64-crt/stdio/msvcr110pre_wstat32.c +++ b/mingw-w64-crt/stdio/msvcr110pre_wstat32.c @@ -23,7 +23,7 @@ int __cdecl wstat32(const wchar_t *_Filename, struct _stat32 *_Stat) if (_path == NULL && _Filename != NULL) return -1; int ret = _wstat32i64(_path, &st); - ret = __mingw_fix_stat_finish(ret, _Filename, _path, _Stat->st_mode); + ret = __mingw_fix_stat_finish(ret, _Filename, _path, st.st_mode); if (ret != 0) return ret; if (st.st_size > UINT32_MAX) { diff --git a/mingw-w64-crt/stdio/msvcr110pre_wstat64i32.c b/mingw-w64-crt/stdio/msvcr110pre_wstat64i32.c index a94703ea0..9a5561203 100644 --- a/mingw-w64-crt/stdio/msvcr110pre_wstat64i32.c +++ b/mingw-w64-crt/stdio/msvcr110pre_wstat64i32.c @@ -23,7 +23,7 @@ int __cdecl wstat64i32(const wchar_t *_Filename, struct _stat64i32 *_Stat) if (_path == NULL && _Filename != NULL) return -1; int ret = _wstat64(_path, &st); - ret = __mingw_fix_stat_finish(ret, _Filename, _path, _Stat->st_mode); + ret = __mingw_fix_stat_finish(ret, _Filename, _path, st.st_mode); if (ret != 0) return ret; if (st.st_size > UINT32_MAX) { -- 2.43.0 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public