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

Unified Diff: content/common/gpu/media/gpu_video_decode_accelerator.cc

Issue 11722023: Validate texture sizes given to VDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 12 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/gpu_video_decode_accelerator.cc
diff --git a/content/common/gpu/media/gpu_video_decode_accelerator.cc b/content/common/gpu/media/gpu_video_decode_accelerator.cc
index 7e76095f5c6795f0404938e9dab2163e6a572302..e6b1f85eedb9714fa270c435e34979113f6ee833 100644
--- a/content/common/gpu/media/gpu_video_decode_accelerator.cc
+++ b/content/common/gpu/media/gpu_video_decode_accelerator.cc
@@ -231,6 +231,13 @@ void GpuVideoDecodeAccelerator::OnAssignPictureBuffers(
NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT);
return;
}
+ GLsizei width, height;
+ info->GetLevelSize(0, 0, &width, &height);
dwkang1 2013/01/15 08:17:46 crbug says I don't have permission for 168293. So
sheu 2013/01/15 08:25:38 It looks like you're right; I'll have to follow-up
+ if (width != sizes[i].width() || height != sizes[i].height()) {
+ DLOG(FATAL) << "Size mismatch for texture id " << texture_ids[i];
+ NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT);
+ return;
+ }
if (!texture_manager->ClearRenderableLevels(command_decoder, info)) {
DLOG(FATAL) << "Failed to Clear texture id " << texture_ids[i];
NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698