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

Unified Diff: content/renderer/pepper/pepper_media_stream_track_host_base.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 | « content/renderer/pepper/pepper_audio_encoder_host.cc ('k') | device/hid/hid_connection_mac.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/pepper/pepper_media_stream_track_host_base.cc
diff --git a/content/renderer/pepper/pepper_media_stream_track_host_base.cc b/content/renderer/pepper/pepper_media_stream_track_host_base.cc
index c2b8655fdb4cd97e1704a11e60ce80f1b123f77e..947f8468b3a4bc764089668b8e34b0523e7996b1 100644
--- a/content/renderer/pepper/pepper_media_stream_track_host_base.cc
+++ b/content/renderer/pepper/pepper_media_stream_track_host_base.cc
@@ -47,7 +47,7 @@ bool PepperMediaStreamTrackHostBase::InitBuffers(int32_t number_of_buffers,
// TODO(penghuang): |HostAllocateSharedMemoryBuffer| uses sync IPC. We should
// avoid it.
- base::CheckedNumeric<int32_t> size = number_of_buffers * buffer_size_aligned;
+ base::CheckedNumeric<uint32_t> size = number_of_buffers * buffer_size_aligned;
if (!size.IsValid())
return false;
« no previous file with comments | « content/renderer/pepper/pepper_audio_encoder_host.cc ('k') | device/hid/hid_connection_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698