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

Unified Diff: src/platform/vboot_reference/common/utility_stub.c

Issue 650105: Vboot Reference: Add the "real" reference firmware verification function (VerifyFirmware). (Closed)
Patch Set: Review fixes. Created 10 years, 10 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 | src/platform/vboot_reference/crypto/rsa_utility.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/vboot_reference/common/utility_stub.c
diff --git a/src/platform/vboot_reference/common/utility_stub.c b/src/platform/vboot_reference/common/utility_stub.c
index ca12fa610ccf9473018f59c3b87aa0f1f0995d3b..101211296d8c11e2246c4c441b7cbb976d75792d 100644
--- a/src/platform/vboot_reference/common/utility_stub.c
+++ b/src/platform/vboot_reference/common/utility_stub.c
@@ -30,19 +30,17 @@ void* Memcpy(void* dest, const void* src, size_t n) {
void* Memset(void* dest, const uint8_t c, size_t n) {
while (n--) {
- *((uint8_t*)dest) = c;
+ *((uint8_t*)dest++) = c;
}
return dest;
}
int SafeMemcmp(const void* s1, const void* s2, size_t n) {
- int match = 1;
+ int match = 0;
const unsigned char* us1 = s1;
const unsigned char* us2 = s2;
while (n--) {
if (*us1++ != *us2++)
- match = 0;
- else
match = 1;
}
« no previous file with comments | « no previous file | src/platform/vboot_reference/crypto/rsa_utility.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698