hidclass.sys: Prevent buffer overrun.
Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b16fb11890
commit
5040b8d534
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue