The proxy for GetRawInputDeviceInfo() incorrectly assumes that pcbSize
is always in wchars when unicode is used, which is only true if the
name of the device is being queried (`uiCommand == RIDI_DEVICENAME`).
Otherwise, it is the exact size of the buffer in bytes. Right now,
that means that the proxy will write double the number of bytes it's
supposed to for the other `uiCommand` values, potentially causing a
buffer overflow.
Also, when no `pData` value is given, `*pcbSize` is allowed to be
uninitialized. The proxy currently reads it unconditionally as a UINT,
which would be UB in that case. `memcpy` is able to safely copy
uninitialized values, so let's use that instead!
GitHub Actions Workflow: Hash Released Files
This workflow automates the management of release asset hashes whenever a new release is published or edited. Here's an overview of its functionality:
Trigger: The workflow is triggered by the publication or editing of a release in the specified repository.
Download Assets: It downloads all assets associated with the release from GitHub.
Check for Downloaded Assets: Before calculating hashes, the workflow checks if any assets were successfully downloaded. If no assets are found, it sets an environment variable to skip subsequent steps.
Calculate SHA256 Hashes: If assets are downloaded, the workflow calculates the SHA256 hash for each asset and saves these hashes in a file named sha256-checksums.txt.
Check Existing Hash File: The workflow checks for an existing version of the hash file. If found, it compares the new hash file to the existing one.
Conditional Upload:
If the hashes match, it skips the upload process.
If the hashes differ, it deletes the existing hash file asset and uploads the new one.
This workflow ensures that each release includes an up-to-date hash file, enabling users to verify the integrity of downloaded assets efficiently.