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

Unified Diff: components/webcrypto/algorithms/aes_ctr.cc

Issue 2528243002: Fix silent truncations when extracting values from CheckedNumeric (Closed)
Patch Set: compile cleanup and fix Created 4 years, 1 month 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
Index: components/webcrypto/algorithms/aes_ctr.cc
diff --git a/components/webcrypto/algorithms/aes_ctr.cc b/components/webcrypto/algorithms/aes_ctr.cc
index dd7f012f254c98dd17dd3bba6879163ccd08caa4..1a85c7dda74711056c0d3093d011d9c0c44fadb8 100644
--- a/components/webcrypto/algorithms/aes_ctr.cc
+++ b/components/webcrypto/algorithms/aes_ctr.cc
@@ -166,7 +166,7 @@ Status AesCtrEncryptDecrypt(const blink::WebCryptoAlgorithm& algorithm,
return Status::ErrorUnexpected();
const CryptoData counter_block(params->counter());
- buffer->resize(output_max_len.ValueOrDie());
+ buffer->resize(output_max_len.template ValueOrDie<size_t>());
// The total number of possible counter values is pow(2, counter_length_bits)
bssl::UniquePtr<BIGNUM> num_counter_values(BN_new());

Powered by Google App Engine
This is Rietveld 408576698