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

Unified Diff: gpu/command_buffer/service/query_manager.cc

Issue 197463012: Merge 256723 "Add bounds validation to AsyncPixelTransfersComple..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1750/src/
Patch Set: Created 6 years, 9 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: gpu/command_buffer/service/query_manager.cc
===================================================================
--- gpu/command_buffer/service/query_manager.cc (revision 256969)
+++ gpu/command_buffer/service/query_manager.cc (working copy)
@@ -98,6 +98,9 @@
mem_params.shm_size = buffer.size;
mem_params.shm_data_offset = shm_offset();
mem_params.shm_data_size = sizeof(QuerySync);
+ uint32 end = mem_params.shm_data_offset + mem_params.shm_data_size;
+ if (end > mem_params.shm_size || end < mem_params.shm_data_offset)
+ return false;
observer_ = new AsyncPixelTransferCompletionObserverImpl(submit_count);
« 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