Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/hid/hidp.c | 2 +- dlls/ntoskrnl.exe/tests/ntoskrnl.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c index 750dbce9f26..6a9fba6e425 100644 --- a/dlls/hid/hidp.c +++ b/dlls/hid/hidp.c @@ -731,8 +731,8 @@ NTSTATUS WINAPI HidP_GetLinkCollectionNodes( HIDP_LINK_COLLECTION_NODE *nodes, U
if (preparsed->magic != HID_MAGIC) return HIDP_STATUS_INVALID_PREPARSED_DATA;
- if (capacity < preparsed->caps.NumberLinkCollectionNodes) return HIDP_STATUS_BUFFER_TOO_SMALL; count = *nodes_len = preparsed->caps.NumberLinkCollectionNodes; + if (capacity < count) return HIDP_STATUS_BUFFER_TOO_SMALL;
for (i = 0; i < count; ++i) { diff --git a/dlls/ntoskrnl.exe/tests/ntoskrnl.c b/dlls/ntoskrnl.exe/tests/ntoskrnl.c index f9bb9e87cda..a3c2a303a59 100644 --- a/dlls/ntoskrnl.exe/tests/ntoskrnl.c +++ b/dlls/ntoskrnl.exe/tests/ntoskrnl.c @@ -1852,7 +1852,6 @@ static void test_hidp(HANDLE file, int report_id) collection_count = 0; status = HidP_GetLinkCollectionNodes(collections, &collection_count, preparsed_data); ok(status == HIDP_STATUS_BUFFER_TOO_SMALL, "HidP_GetLinkCollectionNodes returned %#x\n", status); - todo_wine ok(collection_count == caps.NumberLinkCollectionNodes, "got %d collection nodes, expected %d\n", collection_count, caps.NumberLinkCollectionNodes); collection_count = ARRAY_SIZE(collections);