Brendan Shanks (@bshanks) commented about dlls/winemac.drv/cocoa_display.m:
- {
uint32_t vendor_number, model_number, serial_number;
const unsigned char *edid_ptr;
IOAVServiceRef avservice;
CFDataRef edid = NULL;
IOReturn edid_result;
avservice = pIOAVServiceCreateWithService(kCFAllocatorDefault, service);
if (!avservice)
{
IOObjectRelease(service);
continue;
}
edid_result = pIOAVServiceCopyEDID(avservice, &edid);
if (edid_result != kIOReturnSuccess || !edid)
Maybe also a good idea to call `CFDataGetLength()` here and ensure the CFData is large enough that the `edid_ptr` accesses below won't be reading past the buffer size.