Properly terminate the resulting strings when reading the stdout and stderr of any spawned commands on Windows.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3819 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2009-05-27 18:34:39 +00:00
parent 538f2f5d25
commit 89c442d38a
2 changed files with 3 additions and 0 deletions

View File

@ -7,6 +7,8 @@
* src/win32.c:
On Windows, fallback to the literal build command line if searching
for the command in the system path failed (related to #2795923).
Properly terminate the resulting strings when reading the stdout
and stderr of any spawned commands on Windows.
2009-05-26 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -929,6 +929,7 @@ static gboolean GetContentFromHandle(HANDLE hFile, gchar **content, GError **err
*content = NULL;
return FALSE;
}
buffer[filesize] = '\0';
*content = buffer;
return TRUE;
}