Sunil Mohan : oleaut32: Fix SLTG_ReadString to null terminate.
Alexandre Julliard
julliard at winehq.org
Tue Aug 18 09:59:59 CDT 2009
Module: wine
Branch: master
Commit: f7f50d1252342db0fc035f9066b6ab10ae5f20a6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f7f50d1252342db0fc035f9066b6ab10ae5f20a6
Author: Sunil Mohan <sunilmohan at fsf.org.in>
Date: Tue Aug 18 11:06:42 2009 +0530
oleaut32: Fix SLTG_ReadString to null terminate.
---
dlls/oleaut32/typelib.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/oleaut32/typelib.c b/dlls/oleaut32/typelib.c
index 1f104f8..f16b459 100644
--- a/dlls/oleaut32/typelib.c
+++ b/dlls/oleaut32/typelib.c
@@ -3052,7 +3052,7 @@ static WORD SLTG_ReadString(const char *ptr, BSTR *pBstr)
bytelen = *(const WORD*)ptr;
if(bytelen == 0xffff) return 2;
len = MultiByteToWideChar(CP_ACP, 0, ptr + 2, bytelen, NULL, 0);
- *pBstr = SysAllocStringLen(NULL, len - 1);
+ *pBstr = SysAllocStringLen(NULL, len);
if (*pBstr)
len = MultiByteToWideChar(CP_ACP, 0, ptr + 2, bytelen, *pBstr, len);
return bytelen + 2;
More information about the wine-cvs
mailing list