Victor Martinez Calvo : msvcrt: Avoid null dereference in TRACE in MSVCRT__wfreopen.

Alexandre Julliard julliard at winehq.org
Wed Apr 30 13:32:52 CDT 2014


Module: wine
Branch: master
Commit: f6bb1a51a96fb550f9d5cc4f208364c11147c9e7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f6bb1a51a96fb550f9d5cc4f208364c11147c9e7

Author: Victor Martinez Calvo <vmartinez at reactos.org>
Date:   Tue Apr 29 17:43:26 2014 +0200

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..957cfaf 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 : -1);
 
     LOCK_FILES();
     if (!file || ((fd = file->_file) < 0) || fd > MSVCRT_fdend)




More information about the wine-cvs mailing list