Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/eglib
diff options
context:
space:
mode:
authorMark Probst <mark.probst@gmail.com>2013-08-14 22:22:59 +0400
committerMark Probst <mark.probst@gmail.com>2013-08-14 22:22:59 +0400
commit00f152cfc457d6ab866779cb33dcf19d1b5564c8 (patch)
treef65c7888c6faae8fe154b61bc30faa75fd660995 /eglib
parent6a14275371c6021a076ae99bdee4282432321817 (diff)
Fixed a few bugs that were found by Visual Studio's static code analysis.
Diffstat (limited to 'eglib')
-rw-r--r--eglib/src/gfile-win32.c1
-rw-r--r--eglib/src/gmodule-win32.c1
2 files changed, 2 insertions, 0 deletions
diff --git a/eglib/src/gfile-win32.c b/eglib/src/gfile-win32.c
index 6a4bbefb1d3..a2e41ea9f68 100644
--- a/eglib/src/gfile-win32.c
+++ b/eglib/src/gfile-win32.c
@@ -61,6 +61,7 @@ int mkstemp (char *tmp_template)
fd = _wopen( utf16_template, _O_BINARY | _O_CREAT /*| _O_TEMPORARY*/ | _O_EXCL, _S_IREAD | _S_IWRITE);
}
+ /* FIXME: this will crash if utf16_template == NULL */
sprintf (tmp_template + strlen (tmp_template) - 6, "%S", utf16_template + wcslen (utf16_template) - 6);
g_free (utf16_template);
diff --git a/eglib/src/gmodule-win32.c b/eglib/src/gmodule-win32.c
index 68d1619825c..24010b58915 100644
--- a/eglib/src/gmodule-win32.c
+++ b/eglib/src/gmodule-win32.c
@@ -141,6 +141,7 @@ g_module_error (void)
TCHAR* buf = NULL;
DWORD code = GetLastError ();
+ /* FIXME: buf must not be NULL! */
FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_ALLOCATE_BUFFER, NULL,
code, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), buf, 0, NULL);