[PATCH] hidclass.sys: fixed size passed IOCTL_HID_GET_INPUT_REPORT (Coverity)
hverbeet at gmail.com
Mon Oct 19 08:27:55 CDT 2015
On 19 October 2015 at 15:04, Aric Stewart <aric at codeweavers.com> wrote:
> What is happening here is that the HID_XFER_PACKET is not a variable length structure, it takes a pointer to the buffer. I am taking a bit of a shortcut and instead of allocating the HID_XFER_PACKET structure and a separate buffer, I am allocating 1 block of memory that is both, the buffer just comes after the HID_XFER_PACKET structure.
But it should still be "sizeof(*packet)" instead of "sizeof(packet)", right?
More information about the wine-devel