From: Thomas Faber Date: Wed, 30 Apr 2014 19:05:38 +0000 (+0000) Subject: [CRT] X-Git-Tag: backups/0.3.17@66124~1429 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=174da99a465d640a297d18148b01caa464ac30b3;hp=2f0e570ea6f144625ee70c746597b7e9a56fd974 [CRT] - Fix potential null dereference in TRACE in _wfreopen. Patch by Víctor Martínez CORE-8120 #resolve svn path=/trunk/; revision=63083 --- diff --git a/reactos/lib/sdk/crt/stdio/file.c b/reactos/lib/sdk/crt/stdio/file.c index a08d59e16f8..52e7f09f244 100644 --- a/reactos/lib/sdk/crt/stdio/file.c +++ b/reactos/lib/sdk/crt/stdio/file.c @@ -2813,7 +2813,7 @@ FILE* CDECL _wfreopen(const wchar_t *path, const wchar_t *mode, FILE* file) { int open_flags, stream_flags, fd; - TRACE(":path (%p) mode (%s) file (%p) fd (%d)\n", debugstr_w(path), debugstr_w(mode), file, file->_file); + TRACE(":path (%p) 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 > fdend)