Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Unified Diff: tpm.cc

Issue 6731069: tpm: fix GetCapability calls to use the correct pointer (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/cryptohome.git@master
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tpm.cc
diff --git a/tpm.cc b/tpm.cc
index 3a1c130147c2d3e5a7390eb0f314194f67942c8c..ee04c92246b98cf4a693e624145ddf445e9f763e 100644
--- a/tpm.cc
+++ b/tpm.cc
@@ -630,7 +630,7 @@ unsigned int Tpm::GetMaxRsaKeyCountForContext(TSS_HCONTEXT context_handle) {
return count;
}
if (cap_length == sizeof(unsigned int)) {
- count = *(reinterpret_cast<unsigned int*>(*cap));
+ count = *(reinterpret_cast<unsigned int*>(*cap.ptr()));
}
return count;
}
@@ -1085,7 +1085,7 @@ void Tpm::IsEnabledOwnedCheckViaContext(TSS_HCONTEXT context_handle,
&cap_length, cap.ptr())) == 0) {
if (cap_length >= (sizeof(TSS_BOOL))) {
*enabled = true;
- *owned = ((*(reinterpret_cast<TSS_BOOL*>(*cap))) != 0);
+ *owned = ((*(reinterpret_cast<TSS_BOOL*>(*cap.ptr()))) != 0);
}
} else if(ERROR_CODE(result) == TPM_E_DISABLED) {
*enabled = false;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698