added null terminator to library name
Sven Paschukat
Sven.Paschukat at T-Online.de
Thu Nov 29 14:36:09 CST 2007
---
dlls/ctapi32/ctapi32.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/dlls/ctapi32/ctapi32.c b/dlls/ctapi32/ctapi32.c
index 2af4632..c2fe734 100644
--- a/dlls/ctapi32/ctapi32.c
+++ b/dlls/ctapi32/ctapi32.c
@@ -65,8 +65,10 @@ static int load_functions(void) {
/* Null termination */
buffer_w[size / sizeof(WCHAR)] = '\0';
len = WideCharToMultiByte(CP_UNIXCP, 0, buffer_w, -1, buffer, sizeof(buffer), NULL, NULL);
- if (len)
+ if (len) {
memcpy(soname, buffer, len - 1);
+ soname[len - 1] = '\0';
+ }
}
RegCloseKey(key_handle);
}
--
1.5.2.4
--------------000408000407070701060804--
More information about the wine-patches
mailing list