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

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

Issue 2528243002: Fix silent truncations when extracting values from CheckedNumeric (Closed)
Patch Set: compile fix Created 4 years 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 | « components/webcrypto/algorithms/aes_cbc.cc ('k') | content/renderer/pepper/pepper_audio_encoder_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..3525c5ff37d8771ef4f64a79136edc1d2ce9a1c1 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(base::ValueOrDieForType<size_t>(output_max_len));
// The total number of possible counter values is pow(2, counter_length_bits)
bssl::UniquePtr<BIGNUM> num_counter_values(BN_new());
« no previous file with comments | « components/webcrypto/algorithms/aes_cbc.cc ('k') | content/renderer/pepper/pepper_audio_encoder_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698