From 229be73d2be8e151549b25220093151d012fb8df Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 Apr 2013 01:22:43 -0700 Subject: [PATCH] - client: check return value of FormatMessageW() so we don't print garbage --- lib/win_util.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/win_util.cpp b/lib/win_util.cpp index cb213c06ab..394940bd15 100644 --- a/lib/win_util.cpp +++ b/lib/win_util.cpp @@ -911,6 +911,8 @@ char* windows_format_error_string( if (lpszTemp) { LocalFree((HLOCAL) lpszTemp); } + } else { + strcpy(pszBuf, "(unknown error)"); } return pszBuf;