Commit dec362a7 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hid: Check preparsed data magic in HidP_GetLinkCollectionNodes.

parent b99da49a
...@@ -1001,6 +1001,9 @@ NTSTATUS WINAPI HidP_GetLinkCollectionNodes(HIDP_LINK_COLLECTION_NODE *LinkColle ...@@ -1001,6 +1001,9 @@ NTSTATUS WINAPI HidP_GetLinkCollectionNodes(HIDP_LINK_COLLECTION_NODE *LinkColle
TRACE("(%p, %p, %p)\n", LinkCollectionNode, LinkCollectionNodeLength, PreparsedData); TRACE("(%p, %p, %p)\n", LinkCollectionNode, LinkCollectionNodeLength, PreparsedData);
if (data->magic != HID_MAGIC)
return HIDP_STATUS_INVALID_PREPARSED_DATA;
if (*LinkCollectionNodeLength < data->caps.NumberLinkCollectionNodes) if (*LinkCollectionNodeLength < data->caps.NumberLinkCollectionNodes)
return HIDP_STATUS_BUFFER_TOO_SMALL; return HIDP_STATUS_BUFFER_TOO_SMALL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment