[PATCH v3 1/2] ntoskrnl.exe: Implement IoRegisterDeviceInterface
ver 3: More comments from Zebediah Figura Signed-off-by: Aric Stewart <aric(a)codeweavers.com> --- dlls/ntoskrnl.exe/Makefile.in | 2 +- dlls/ntoskrnl.exe/ntoskrnl.c | 133 ++++++++++++++++++++++++++++++++++++ dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- include/ddk/wdm.h | 1 + 4 files changed, 136 insertions(+), 2 deletions(-)
Aric Stewart <aric(a)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. -- Dmitry.
participants (2)
-
Aric Stewart -
Dmitry Timoshkov