From c220db01281564bf5b50575ee7e24b38e45f5050 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 14 Jul 2014 17:41:09 +0200 Subject: Static Code Analysis : Generalize the use of Safe String functions. Add some NULL pointer checks. Avoid false-positive detection in AppendMenu (MF_SEPARATOR) calls by setting the last parameter to "" instead of NULL. --- src/Common/Tcdefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Common/Tcdefs.h') diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h index 0bf41d79..423eed27 100644 --- a/src/Common/Tcdefs.h +++ b/src/Common/Tcdefs.h @@ -197,7 +197,7 @@ typedef int BOOL; # ifdef DEVICE_DRIVER # define trace_msg Dump # elif defined (_WIN32) -# define trace_msg(...) do { char msg[2048]; _snprintf (msg, sizeof (msg), __VA_ARGS__); OutputDebugString (msg); } while (0) +# define trace_msg(...) do { char msg[2048]; StringCbPrintfA (msg, sizeof (msg), __VA_ARGS__); OutputDebugString (msg); } while (0) # endif # define trace_point trace_msg (__FUNCTION__ ":" TC_TO_STRING(__LINE__) "\n") # else -- cgit v1.2.3