summaryrefslogtreecommitdiff
path: root/PasswordCrypt.c
diff options
context:
space:
mode:
authorPeter Jones <pjones@redhat.com>2013-10-23 10:50:36 -0400
committerPeter Jones <pjones@redhat.com>2013-10-23 10:50:36 -0400
commit56fb385a172890cf4c20c9daa89bb6cccf9c1b4e (patch)
tree961e98270dddc788b4c7902b6bf4b48332108950 /PasswordCrypt.c
parentbe73f6bd4f064015c9f12323e2fb2f51b8cdb631 (diff)
downloadefi-boot-shim-56fb385a172890cf4c20c9daa89bb6cccf9c1b4e.tar.gz
efi-boot-shim-56fb385a172890cf4c20c9daa89bb6cccf9c1b4e.zip
Revert "additional bounds-checking on section sizes"
This reverts commit 21e40f0174814b3d91836e38c7cf95c8f2f1f3a4. In principle I like the idea of what's going on here, but generate_hash() really does need to have the expected result.
Diffstat (limited to 'PasswordCrypt.c')
-rw-r--r--PasswordCrypt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/PasswordCrypt.c b/PasswordCrypt.c
index e0a82cfd..8d72a821 100644
--- a/PasswordCrypt.c
+++ b/PasswordCrypt.c
@@ -154,7 +154,7 @@ static EFI_STATUS sha256_crypt (const char *key, UINT32 key_len,
CopyMem(cp, tmp_result, cnt);
SHA256_Init(&alt_ctx);
- for (cnt = 0; cnt < 16ul + alt_result[0]; ++cnt)
+ for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt)
SHA256_Update(&alt_ctx, salt, salt_size);
SHA256_Final(tmp_result, &alt_ctx);
@@ -242,7 +242,7 @@ static EFI_STATUS sha512_crypt (const char *key, UINT32 key_len,
CopyMem(cp, tmp_result, cnt);
SHA512_Init(&alt_ctx);
- for (cnt = 0; cnt < 16ul + alt_result[0]; ++cnt)
+ for (cnt = 0; cnt < 16 + alt_result[0]; ++cnt)
SHA512_Update(&alt_ctx, salt, salt_size);
SHA512_Final(tmp_result, &alt_ctx);