-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Thanks again for your work!
Am 2015-02-23 um 08:41 schrieb Alistair Leslie-Hughes:
+{
- if (!This->comp_count)
This->components = heap_alloc( sizeof(struct component *) * This->comp_count+1 );
- else
This->components = heap_realloc(This->components, sizeof(struct component *) * This->comp_count+1 );
- This->components[This->comp_count] = item;
- This->comp_count++;
+}
This still has no error checks.
@@ -369,9 +397,48 @@ static HRESULT WINAPI IDirectPlay8AddressImpl_GetComponentByIndex(IDirectPlay8Ad
const DWORD dwComponentID, WCHAR *pwszName, DWORD *pdwNameLen, void *pvBuffer,
DWORD *pdwBufferSize, DWORD *pdwDataType)
{
...
- if (!pdwNameLen || !pdwBufferSize)
return E_POINTER;
In GetComponentByName you have additional checks for !pvBuffer.
What is pwszName name used for? Are you supposed to write the name of
the retrieved component (with proper length checks)?
case DPNA_DATATYPE_STRING:
I expect this also applies to DPNA_DATATYPE_STRING_ANSI. Please move it
to a separate patch (preferably before the GetComponentByIndex
changes), together with the tests for the length check.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQIcBAEBAgAGBQJU6uQ9AAoJEN0/YqbEcdMwW4wP/0wYOQ+Sw3FZw/TAQ682yMmb
FJBuRuymWoQthCAnc7kS7wsDwz+erbNPqjFE/MUrbuTHeIRtRJegtMTcLsq/ycSx
pzV9uaZoG9MkGMPky/TTgWAyOvWu6w1fVBgUunnQlX8okMk+HMve+qiayeuHSgj9
CyznrrG/gLsVamZfJidnpMlwJ3a2Az5GOYG3yoCKGEiBzthS8niRvf4PLrNa/T5s
/YUcfoorChwNnTEu1F+BEJt/CJTFy+qnrGOplDo5cCG6XJ9cK10JEsXybShSA1LT
byol2yxMHNR1MdKw/ZsDJiS8RDnCPKTZiaY45FB7BZkyle5J/jJ9wfkBX/L+ID3M
mMM1qo5nKjjbiICMkYIRHO4LW9lyCT4FKBLkXwGWTo7Npxpb7iB5Jo2X5sl8o3K4
d1TL7kjdmIj3nz+TbPyVrZZHV4GkBJ3Wgmv1b+uNdPQ6SSotzy6I6FzG1YkivQvF
mo8cFFJTs0OO/fUBN5wggkiU4YAheHn258wz7EcepyPMH431GsFp9QVcZbNEQVNi
hEasoqLeql/GzI0ZRmOLTLdueVsajZGhoHLGgN10SSql60dfsPZhfpQMrhsX8HQf
Ub5SXqAWAc3vZmvv1I1POyUATNxTV8WWZfSmd7QBv+4qsJX2hsXE3Y4/I8cmIv0I
OonvF4surL4lU+vFIkJC
=eOzT
-----END PGP SIGNATURE-----