diff options
author | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2014-05-20 01:37:58 -0700 |
---|---|---|
committer | Jeremy Huddleston Sequoia <jeremyhu@apple.com> | 2014-05-20 01:39:32 -0700 |
commit | ea5839c8fef1fbaee8a8a5a6389f35dd537dccfc (patch) | |
tree | 46bf9409ba54b09157ef9b6c5a17e52851810996 | |
parent | 2d6f733979dd3c3e3f32876bb1eb89c0693edf80 (diff) |
glapi: Avoid heap corruption in _glapi_table
Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Chia-I Wu <olv@lunarg.com>
(cherry picked from commit ff5456d1acf6f627a6837be3f3f37c6a268c9e8e)
-rw-r--r-- | src/mapi/glapi/gen/gl_gentable.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py index 35dddc7a088..d45a5e0ffc3 100644 --- a/src/mapi/glapi/gen/gl_gentable.py +++ b/src/mapi/glapi/gen/gl_gentable.py @@ -113,7 +113,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) { struct _glapi_table * _glapi_create_table_from_handle(void *handle, const char *symbol_prefix) { - struct _glapi_table *disp = calloc(1, sizeof(struct _glapi_table)); + struct _glapi_table *disp = calloc(1, _glapi_get_dispatch_table_size() * sizeof(_glapi_proc)); char symboln[512]; if(!disp) |