CID1108404: missing array inintialization
BuildReportList checks that the array does not already holds the reports before adding them. If one of the uninitialized elements happened to be the address of one of the reports, it would not get added again, possibly leading to items in the array being in the wrong order. Just be safe and clear the array. Fixes #10221, patch there not used as it cluttered the code more than needed.
This commit is contained in:
parent
d350b0f0d4
commit
cd06fa402b
@ -147,7 +147,7 @@ TabletProtocolHandler::AddHandlers(HIDDevice &device, HIDCollection &collection,
|
||||
return;
|
||||
|
||||
uint32 inputReportCount = 0;
|
||||
HIDReport *inputReports[maxReportCount];
|
||||
HIDReport *inputReports[maxReportCount] = {0};
|
||||
collection.BuildReportList(HID_REPORT_TYPE_INPUT, inputReports,
|
||||
inputReportCount);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user