* strace.cc (strace::vsprntf): Fix potential (if unlikely) use of uninitialized
variable.
This commit is contained in:
parent
57cfbb7bbf
commit
53b14dc2b1
@ -1,3 +1,8 @@
|
|||||||
|
2013-12-22 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||||
|
|
||||||
|
* strace.cc (strace::vsprntf): Fix potential (if unlikely) use of
|
||||||
|
uninitialized variable.
|
||||||
|
|
||||||
2013-12-18 Christopher Faylor <me.cygwin2013@cgf.cx>
|
2013-12-18 Christopher Faylor <me.cygwin2013@cgf.cx>
|
||||||
|
|
||||||
* dcrt0.cc (dll_crt0_1): Remove NtSetTimerResolution.
|
* dcrt0.cc (dll_crt0_1): Remove NtSetTimerResolution.
|
||||||
|
@ -156,11 +156,12 @@ strace::vsprntf (char *buf, const char *func, const char *infmt, va_list ap)
|
|||||||
else if (__progname)
|
else if (__progname)
|
||||||
sys_mbstowcs(pn = progname, NT_MAX_PATH, __progname);
|
sys_mbstowcs(pn = progname, NT_MAX_PATH, __progname);
|
||||||
|
|
||||||
|
WCHAR empty[1] = {};
|
||||||
PWCHAR p;
|
PWCHAR p;
|
||||||
if (!pn)
|
if (!pn)
|
||||||
GetModuleFileNameW (NULL, pn = progname, sizeof (progname));
|
GetModuleFileNameW (NULL, pn = progname, sizeof (progname));
|
||||||
if (!pn)
|
if (!pn)
|
||||||
/* hmm */;
|
p = empty;
|
||||||
else if ((p = wcsrchr (pn, L'\\')) != NULL)
|
else if ((p = wcsrchr (pn, L'\\')) != NULL)
|
||||||
p++;
|
p++;
|
||||||
else if ((p = wcsrchr (pn, L'/')) != NULL)
|
else if ((p = wcsrchr (pn, L'/')) != NULL)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user