Module: Mesa Branch: 10.2 Commit: ac49f97f12324733220428128bce3f460fbffbbd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac49f97f12324733220428128bce3f460fbffbbd
Author: Jeremy Huddleston Sequoia <jerem...@apple.com> Date: Tue May 20 01:37:58 2014 -0700 glapi: Avoid heap corruption in _glapi_table Signed-off-by: Jeremy Huddleston Sequoia <jerem...@apple.com> Reviewed-by: Chia-I Wu <o...@lunarg.com> (cherry picked from commit ff5456d1acf6f627a6837be3f3f37c6a268c9e8e) --- src/mapi/glapi/gen/gl_gentable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py index 35dddc7..d45a5e0 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) _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-commit