Esme Povirk (@madewokherd) commented about dlls/windowscodecs/metadatahandler.c:
if (SUCCEEDED(hr))
hr = IStream_Seek(sub_stream, pos, STREAM_SEEK_SET, NULL);
if (SUCCEEDED(hr))
hr = create_metadata_reader(item->id.uiVal == IFD_EXIF_TAG ? &GUID_MetadataFormatExif : &GUID_MetadataFormatGps,
vendor, options | WICMetadataCreationFailUnknown, sub_stream, &sub_reader);
if (SUCCEEDED(hr))
{
item->value.vt = VT_UNKNOWN;
item->value.punkVal = (IUnknown *)sub_reader; }
-static HRESULT LoadIfdMetadata(IStream *input, const GUID *preferred_vendor,
- DWORD persist_options, MetadataItem **items, DWORD *item_count)
if (sub_stream)
`sub_stream` can be used uninitialized here (`create_stream_wrapper` doesn't set it to NULL on failure).