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

tpm: tpm_deprecated.c fix compare #36

Closed
wants to merge 5 commits into from
Closed

tpm: tpm_deprecated.c fix compare #36

wants to merge 5 commits into from

Conversation

alonbl
Copy link
Contributor

@alonbl alonbl commented Sep 1, 2018

tpm/tpm_deprecated.c:437:7: error: ‘__builtin_memcmp_eq’ reading 20 bytes from a region of size 8 [-Werror=stringop-overflow=]
if (memcmp(&b1, &newAuthLink, sizeof(TPM_HMAC))) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Bug: https://bugs.gentoo.org/show_bug.cgi?id=664198

@alonbl
Copy link
Contributor Author

alonbl commented Sep 1, 2018

Not sure how it worked so far... but it seems like it is a mistake.

@alonbl
Copy link
Contributor Author

alonbl commented Sep 9, 2018

ping?

florolf and others added 5 commits September 11, 2018 13:30
Compiling with a recent GCC fails as follows:

  tpm-emulator/tpm/tpm_cmd_handler.c: In function ‘tpm_setup_rsp_auth’:
  tpm-emulator/tpm/tpm_cmd_handler.c:3332:7: error: this statement may fall through [-Werror=implicit-fallthrough=]
         tpm_hmac_final(&hmac, rsp->auth2->auth);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  tpm-emulator/tpm/tpm_cmd_handler.c:3333:5: note: here
       case TPM_TAG_RSP_AUTH1_COMMAND:

Looking at the code, this does indeed seem unintentional. Add a break
state in the appropriate place.
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
@alonbl
Copy link
Contributor Author

alonbl commented Sep 15, 2018

dup of #30

@alonbl alonbl closed this Sep 15, 2018
@alonbl alonbl deleted the build branch September 15, 2018 17:18
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.

None yet

2 participants