windowscodecs: Initialize unused part of metadata PROPVARIANT to 0.
This commit is contained in:
parent
e8b76b32e6
commit
ca5c0f6b14
|
@ -75,7 +75,7 @@ static HRESULT load_LSD_metadata(IStream *stream, const GUID *vendor, DWORD opti
|
||||||
hr = IStream_Read(stream, &lsd_data, sizeof(lsd_data), &bytesread);
|
hr = IStream_Read(stream, &lsd_data, sizeof(lsd_data), &bytesread);
|
||||||
if (FAILED(hr) || bytesread != sizeof(lsd_data)) return S_OK;
|
if (FAILED(hr) || bytesread != sizeof(lsd_data)) return S_OK;
|
||||||
|
|
||||||
result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem) * 9);
|
result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MetadataItem) * 9);
|
||||||
if (!result) return E_OUTOFMEMORY;
|
if (!result) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
for (i = 0; i < 9; i++)
|
for (i = 0; i < 9; i++)
|
||||||
|
@ -180,7 +180,7 @@ static HRESULT load_IMD_metadata(IStream *stream, const GUID *vendor, DWORD opti
|
||||||
hr = IStream_Read(stream, &imd_data, sizeof(imd_data), &bytesread);
|
hr = IStream_Read(stream, &imd_data, sizeof(imd_data), &bytesread);
|
||||||
if (FAILED(hr) || bytesread != sizeof(imd_data)) return S_OK;
|
if (FAILED(hr) || bytesread != sizeof(imd_data)) return S_OK;
|
||||||
|
|
||||||
result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem) * 8);
|
result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MetadataItem) * 8);
|
||||||
if (!result) return E_OUTOFMEMORY;
|
if (!result) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
for (i = 0; i < 8; i++)
|
for (i = 0; i < 8; i++)
|
||||||
|
@ -273,7 +273,7 @@ static HRESULT load_GCE_metadata(IStream *stream, const GUID *vendor, DWORD opti
|
||||||
hr = IStream_Read(stream, &gce_data, sizeof(gce_data), &bytesread);
|
hr = IStream_Read(stream, &gce_data, sizeof(gce_data), &bytesread);
|
||||||
if (FAILED(hr) || bytesread != sizeof(gce_data)) return S_OK;
|
if (FAILED(hr) || bytesread != sizeof(gce_data)) return S_OK;
|
||||||
|
|
||||||
result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem) * 5);
|
result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MetadataItem) * 5);
|
||||||
if (!result) return E_OUTOFMEMORY;
|
if (!result) return E_OUTOFMEMORY;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++)
|
for (i = 0; i < 5; i++)
|
||||||
|
@ -388,7 +388,7 @@ static HRESULT load_APE_metadata(IStream *stream, const GUID *vendor, DWORD opti
|
||||||
data_size += subblock_size + 1;
|
data_size += subblock_size + 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem) * 2);
|
result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MetadataItem) * 2);
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, data);
|
HeapFree(GetProcessHeap(), 0, data);
|
||||||
|
@ -493,7 +493,7 @@ static HRESULT load_GifComment_metadata(IStream *stream, const GUID *vendor, DWO
|
||||||
|
|
||||||
data[data_size] = 0;
|
data[data_size] = 0;
|
||||||
|
|
||||||
result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem));
|
result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MetadataItem));
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, data);
|
HeapFree(GetProcessHeap(), 0, data);
|
||||||
|
|
|
@ -696,7 +696,7 @@ static HRESULT LoadUnknownMetadata(IStream *input, const GUID *preferred_vendor,
|
||||||
return hr;
|
return hr;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem));
|
result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MetadataItem));
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, data);
|
HeapFree(GetProcessHeap(), 0, data);
|
||||||
|
@ -1126,7 +1126,7 @@ static HRESULT LoadIfdMetadata(IStream *input, const GUID *preferred_vendor,
|
||||||
return WINCODEC_ERR_BADMETADATAHEADER;
|
return WINCODEC_ERR_BADMETADATAHEADER;
|
||||||
}
|
}
|
||||||
|
|
||||||
result = HeapAlloc(GetProcessHeap(), 0, count * sizeof(*result));
|
result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, count * sizeof(*result));
|
||||||
if (!result)
|
if (!result)
|
||||||
{
|
{
|
||||||
HeapFree(GetProcessHeap(), 0, entry);
|
HeapFree(GetProcessHeap(), 0, entry);
|
||||||
|
|
|
@ -111,7 +111,7 @@ static HRESULT LoadTextMetadata(IStream *stream, const GUID *preferred_vendor,
|
||||||
|
|
||||||
value_len = data_size - name_len - 1;
|
value_len = data_size - name_len - 1;
|
||||||
|
|
||||||
result = HeapAlloc(GetProcessHeap(), 0, sizeof(MetadataItem));
|
result = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(MetadataItem));
|
||||||
name = HeapAlloc(GetProcessHeap(), 0, name_len + 1);
|
name = HeapAlloc(GetProcessHeap(), 0, name_len + 1);
|
||||||
value = HeapAlloc(GetProcessHeap(), 0, value_len + 1);
|
value = HeapAlloc(GetProcessHeap(), 0, value_len + 1);
|
||||||
if (!result || !name || !value)
|
if (!result || !name || !value)
|
||||||
|
|
Loading…
Reference in New Issue