Skip to content

fix(pedm): CryptCATAdminCalcHashFromFileHandle2 does not return error with NULL buffer #1323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025

Conversation

thenextman
Copy link
Member

The CryptCATAdminCalcHashFromFileHandle2 documentation says:

Return value

[...]

ERROR_INSUFFICIENT_BUFFER | The buffer pointed to by the pbHash parameter was not NULL but was not large enough to be written. The correct size of the required buffer is contained in the value pointed to by the pcbHash parameter.

Ergo, the function will not return an error when passing a NULL value for pbHash, it will succeed. This is confusing because other similar Win32 APIs do not work the same way.

@thenextman thenextman requested a review from a team May 6, 2025 18:05
Copy link

github-actions bot commented May 6, 2025

Let maintainers know that an action is required on their side

  • Add the label release-required Please cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module) when you request a maintainer to cut a new release (Devolutions Gateway, Devolutions Agent, Jetsocat, PowerShell module)

  • Add the label release-blocker Follow-up is required before cutting a new release if a follow-up is required before cutting a new release

  • Add the label publish-required Please publish libraries (`Devolutions.Gateway.Utils`, OpenAPI clients, etc) when you request a maintainer to publish libraries (Devolutions.Gateway.Utils, OpenAPI clients, etc.)

  • Add the label publish-blocker Follow-up is required before publishing libraries if a follow-up is required before publishing libraries

@thenextman thenextman enabled auto-merge (squash) May 6, 2025 18:28
@thenextman thenextman merged commit 74dad40 into master May 6, 2025
40 checks passed
@thenextman thenextman deleted the DGW-251-2 branch May 6, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants