Commit 5040b8d5 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

hidclass.sys: Prevent buffer overrun.

parent b16fb118
......@@ -838,8 +838,7 @@ static WINE_HIDP_PREPARSED_DATA* build_PreparseData(
if (features[0]->caps.ReportID != 0)
{
unsigned int *report_ids;
unsigned int cnt = max(i_count, o_count);
cnt = max(cnt, f_count);
unsigned int cnt = i_count + o_count + f_count;
report_ids = HeapAlloc(GetProcessHeap(), 0 , sizeof(*report_ids) * cnt);
if (i_count)
......
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