Esme Povirk (@madewokherd) commented about dlls/windowscodecs/pngformat.c:
- if (!result || !name) {
HeapFree(GetProcessHeap(), 0, data);
CoTaskMemFree(name);
return E_OUTOFMEMORY;
- }
- PropVariantInit(&result[0].schema);
- PropVariantInit(&result[0].id);
- PropVariantInit(&result[0].value);
- result[0].id.vt = VT_LPWSTR;
- result[0].id.pwszVal = name;
- result[0].value.vt = VT_UI2|VT_VECTOR;
- result[0].value.caui.cElems = element_count;
- result[0].value.caui.pElems = CoTaskMemAlloc(element_count * sizeof(USHORT));
This should probably be checked for NULL.