ole32: Null terminate strings in STREAM_ReadString function.
This commit is contained in:
parent
3ff1c92dd1
commit
306e98425b
|
@ -8698,7 +8698,10 @@ static HRESULT STREAM_ReadString( IStream *stm, LPWSTR *string )
|
|||
len = MultiByteToWideChar( CP_ACP, 0, str, count, NULL, 0 );
|
||||
wstr = CoTaskMemAlloc( (len + 1)*sizeof (WCHAR) );
|
||||
if( wstr )
|
||||
{
|
||||
MultiByteToWideChar( CP_ACP, 0, str, count, wstr, len );
|
||||
wstr[len] = 0;
|
||||
}
|
||||
CoTaskMemFree( str );
|
||||
|
||||
*string = wstr;
|
||||
|
|
Loading…
Reference in New Issue