Commit de8f8334 authored by Raphael Junqueira's avatar Raphael Junqueira Committed by Alexandre Julliard

- bug fixes on AddProp, AddContainer (stupid buffer overflows)

- more complete container hierarchy - DXDiag_AddFileDescContainer service to fill dll info - almost complete DXDiag_InitDXDiagDirectXFilesContainer (for now)
parent 53b1d051
......@@ -3,8 +3,8 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@
VPATH = @srcdir@
MODULE = dxdiagn.dll
IMPORTS = ole32 oleaut32 user32 advapi32 kernel32
EXTRALIBS = -ldxguid -luuid
IMPORTS = version ole32 oleaut32 user32 advapi32 kernel32
EXTRALIBS = -ldxguid -luuid $(LIBUNICODE)
C_SRCS = \
container.c \
......
......@@ -241,7 +241,7 @@ HRESULT WINAPI IDxDiagContainerImpl_AddProp(PDXDIAGCONTAINER iface, LPCWSTR pwsz
}
VariantInit(&pNew->v);
VariantCopy(&pNew->v, pVarProp);
pNew->vName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lstrlenW(pwszPropName) * sizeof(WCHAR));
pNew->vName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pwszPropName) + 1) * sizeof(WCHAR));
lstrcpyW(pNew->vName, pwszPropName);
pNew->next = NULL;
......@@ -274,7 +274,7 @@ HRESULT WINAPI IDxDiagContainerImpl_AddChildContainer(PDXDIAGCONTAINER iface, LP
return E_OUTOFMEMORY;
}
pNew->pCont = pSubCont;
pNew->contName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, lstrlenW(pszContName) * sizeof(WCHAR));
pNew->contName = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, (lstrlenW(pszContName) + 1) * sizeof(WCHAR));
lstrcpyW(pNew->contName, pszContName);
pNew->next = NULL;
......
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