Skip to content

atcacert_def.c: remove duplicate initialization of temp_buf_size #1

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

Closed
wants to merge 1 commit into from

Conversation

macpijan
Copy link

@macpijan macpijan commented Feb 6, 2018

Signed-off-by: Maciej Pijanowski [email protected]

@BenUdall-Microchip
Copy link
Collaborator

Thank you for the report, however, this change introduces subtle bug. The atcacert_get_cert_sn() function actually modifies temp_buf_size to report the sn size. Without resetting the size, the size check later on will not be aware of the full size of temp_buf and may error out with ATCACERT_E_BUFFER_TOO_SMALL inappropriately.

I have noted the extra initialization temp_buf_size and will add that fix to our next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants