Skip to content
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

Non sized buffers are not checked for exact size. #485

Open
Superhepper opened this issue Jan 6, 2024 · 0 comments
Open

Non sized buffers are not checked for exact size. #485

Superhepper opened this issue Jan 6, 2024 · 0 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@Superhepper
Copy link
Collaborator

The sized buffers are TPM2B types which can contain data of different length (such as TPM2B_NAME or TPM2B_DIGEST). The current macro handles them well by checking that when the native type is created the size of the data does not exceed the maximum size.

But for other buffer types (such as TPM2B_SENSITIVE_DATA) they usually have a fixed size so the macro that creates them should probably behave differently by checking that the size of the data equals the expected size and if it does not it is an error.

@Superhepper Superhepper added bug Something isn't working enhancement New feature or request labels Jan 6, 2024
@Superhepper Superhepper changed the title Adapt buffer macro for non sized buffers. Non sized buffers are not checked for exact size. Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant