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

Unified Diff: content/child/webcrypto/openssl/hmac_openssl.cc

Issue 684243002: Fix chrome/ and content/ builds in Windows + BoringSSL. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nacl-fix
Patch Set: Created 6 years, 2 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 | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/openssl/hmac_openssl.cc
diff --git a/content/child/webcrypto/openssl/hmac_openssl.cc b/content/child/webcrypto/openssl/hmac_openssl.cc
index 46cca8424a1035ebcb1a5ed53584153d9e185121..77b5ccfcf93481c77711bab07dc696e79ad476e8 100644
--- a/content/child/webcrypto/openssl/hmac_openssl.cc
+++ b/content/child/webcrypto/openssl/hmac_openssl.cc
@@ -44,8 +44,8 @@ Status SignHmac(const std::vector<uint8_t>& raw_key,
// First, HMAC() needs a void* for the key data, so make one up front as a
// cosmetic to avoid a cast. Second, OpenSSL does not like a NULL key,
// which will result if the raw_key vector is empty; an entirely valid
- // case. Handle this specific case by pointing to an empty array.
- const unsigned char null_key[] = {};
+ // case. Handle this specific case by pointing to a fresh array.
+ const unsigned char null_key[] = {0};
const void* const raw_key_voidp = raw_key.size() ? &raw_key[0] : null_key;
buffer->resize(hmac_expected_length);
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698