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

Unified Diff: gpu/command_buffer/service/common_decoder.h

Issue 2764403002: Make sure buffers are large enough to hold the Result structure. (Closed)
Patch Set: Created 3 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 | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/common_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/common_decoder.h
diff --git a/gpu/command_buffer/service/common_decoder.h b/gpu/command_buffer/service/common_decoder.h
index 5b41775b226ec279f8e040e3b7660ecdc099a076..3c23d539b67d3776c6ccf1e59d344c7e8b2ab90a 100644
--- a/gpu/command_buffer/service/common_decoder.h
+++ b/gpu/command_buffer/service/common_decoder.h
@@ -152,13 +152,16 @@ class GPU_EXPORT CommonDecoder : NON_EXPORTED_BASE(public AsyncAPIInterface) {
void* GetAddressAndSize(unsigned int shm_id,
unsigned int offset,
+ unsigned int minimum_size,
unsigned int* size);
template <typename T>
T GetSharedMemoryAndSizeAs(unsigned int shm_id,
unsigned int offset,
+ unsigned int minimum_size,
unsigned int* size) {
- return static_cast<T>(GetAddressAndSize(shm_id, offset, size));
+ return static_cast<T>(
+ GetAddressAndSize(shm_id, offset, minimum_size, size));
}
unsigned int GetSharedMemorySize(unsigned int shm_id, unsigned int offset);
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/common_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698