From 1b97337dfa35caea3497e5a019948d7eaf2090e8 Mon Sep 17 00:00:00 2001 From: Victor Martinez Calvo Date: Tue, 29 Apr 2014 17:43:26 +0200 Subject: msvcrt: Avoid null dereference in TRACE in MSVCRT__wfreopen. --- dlls/msvcrt/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/msvcrt/file.c b/dlls/msvcrt/file.c index aff5a89..62b506d 100644 --- a/dlls/msvcrt/file.c +++ b/dlls/msvcrt/file.c @@ -4040,7 +4040,7 @@ MSVCRT_FILE* CDECL MSVCRT__wfreopen(const MSVCRT_wchar_t *path, const MSVCRT_wch { int open_flags, stream_flags, fd; - TRACE(":path (%s) mode (%s) file (%p) fd (%d)\n", debugstr_w(path), debugstr_w(mode), file, file->_file); + TRACE(":path (%s) mode (%s) file (%p) fd (%d)\n", debugstr_w(path), debugstr_w(mode), file, file ? file->_file : 0); LOCK_FILES(); if (!file || ((fd = file->_file) < 0) || fd > MSVCRT_fdend) -- 1.9.0.msysgit.0