diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-03 20:38:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-03 20:38:21 +0000 |
commit | 3ee4922ced4b74e3c3f8aba355239932bb8afee5 (patch) | |
tree | a56368c50d4967cd5037c86dfd30c70569b0662f | |
parent | d0b6de7a98df3ee10c6acb53ca7566a090aa7385 (diff) | |
download | pdfium-3ee4922ced4b74e3c3f8aba355239932bb8afee5.tar.xz |
Remove some impossible null checks from fx_crypt_sha.cpp
We always call CRYPT_SHA*Start() with &ctx, so it can't be null.
Found by inspecting code coverage report.
Change-Id: Ibdca16e6a1f2d60514270fe386bf555668ec3586
Reviewed-on: https://pdfium-review.googlesource.com/c/43452
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r-- | core/fdrm/crypto/fx_crypt_sha.cpp | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/core/fdrm/crypto/fx_crypt_sha.cpp b/core/fdrm/crypto/fx_crypt_sha.cpp index 55b885db75..31742e79c6 100644 --- a/core/fdrm/crypto/fx_crypt_sha.cpp +++ b/core/fdrm/crypto/fx_crypt_sha.cpp @@ -510,9 +510,6 @@ void CRYPT_SHA256Generate(const uint8_t* data, } void CRYPT_SHA384Start(CRYPT_sha2_context* ctx) { - if (!ctx) - return; - memset(ctx, 0, sizeof(CRYPT_sha2_context)); ctx->state[0] = 0xcbbb9d5dc1059ed8ULL; ctx->state[1] = 0x629a292a367cd507ULL; @@ -583,9 +580,6 @@ void CRYPT_SHA384Generate(const uint8_t* data, } void CRYPT_SHA512Start(CRYPT_sha2_context* ctx) { - if (!ctx) - return; - memset(ctx, 0, sizeof(CRYPT_sha2_context)); ctx->state[0] = 0x6a09e667f3bcc908ULL; ctx->state[1] = 0xbb67ae8584caa73bULL; |