Commit 27adacc5 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

itss: Don't over-allocate memory for a ITSS_IStorageImpl.

parent 61a02935
......@@ -616,13 +616,11 @@ static HRESULT ITSS_create_chm_storage(
struct chmFile *chmfile, const WCHAR *dir, IStorage** ppstgOpen )
{
ITSS_IStorageImpl *stg;
DWORD len;
TRACE("%p %s\n", chmfile, debugstr_w( dir ) );
len = strlenW( dir ) + 1;
stg = HeapAlloc( GetProcessHeap(), 0,
sizeof (ITSS_IStorageImpl) + len*sizeof(WCHAR) );
FIELD_OFFSET( ITSS_IStorageImpl, dir[strlenW( dir ) + 1] ));
stg->IStorage_iface.lpVtbl = &ITSS_IStorageImpl_Vtbl;
stg->ref = 1;
stg->chmfile = chmfile;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment