From: Jeremy Huddleston Sequoia Date: Tue, 20 May 2014 08:37:58 +0000 (-0700) Subject: glapi: Avoid heap corruption in _glapi_table X-Git-Tag: upstream/10.3~1949 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ff5456d1acf6f627a6837be3f3f37c6a268c9e8e;p=platform%2Fupstream%2Fmesa.git glapi: Avoid heap corruption in _glapi_table Signed-off-by: Jeremy Huddleston Sequoia Reviewed-by: Chia-I Wu --- 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)