Aric Stewart aric@codeweavers.com wrote:
do{rc = SetupDiEnumDeviceInfo( infoset, index, &devInfo );if (IsEqualGUID( &devInfo.ClassGuid, class_guid ))
Without an rc check IsEqualGUID() will use bogus data.
{BOOL check;check = SetupDiGetDeviceInstanceIdW( infoset, &devInfo, id, size, &required );if (check && strcmpW( id, instance_id ) == 0)break;}index++;} while (rc);
There are other places in the patch that don't check the API result before using bogus data in case of an error.