Index: content/browser/renderer_host/media/video_capture_controller.cc |
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc |
index 8ff97bdf767d93c8821ef401ec33b229dfc31348..cbc66d2d9e654b30ba48cacc8bdf78ce9546b463 100644 |
--- a/content/browser/renderer_host/media/video_capture_controller.cc |
+++ b/content/browser/renderer_host/media/video_capture_controller.cc |
@@ -469,6 +469,10 @@ void VideoCaptureController::VideoCaptureDeviceClient::OnIncomingCapturedData( |
NOTREACHED(); |
} |
+ // The input |length| can be greater than the required buffer size because of |
+ // paddings and/or alignments, but it cannot be less. |
+ DCHECK_GE(static_cast<size_t>(length), frame_format.ImageAllocationSize()); |
+ |
if (libyuv::ConvertToI420(data, |
length, |
yplane, |