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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

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 | « no previous file | gpu/command_buffer/service/common_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/build_gles2_cmd_buffer.py
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index d3836079cebdf723044eb62e96246b1e6ee2e27e..479b2d6be187cde9f2c8555557e3138153ef5373 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -6703,7 +6703,7 @@ class GETnHandler(TypeHandler):
typedef cmds::%(func_name)s::Result Result;
Result* result = GetSharedMemoryAndSizeAs<Result*>(
c.%(last_arg_name)s_shm_id, c.%(last_arg_name)s_shm_offset,
- &buffer_size);
+ sizeof(Result), &buffer_size);
%(last_arg_type)s %(last_arg_name)s = result ? result->GetData() : NULL;
if (%(last_arg_name)s == NULL) {
return error::kOutOfBounds;
« no previous file with comments | « no previous file | gpu/command_buffer/service/common_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698