mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 17:58:26 +02:00
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 ff5456d1ac)
This commit is contained in:
parent
2d6f733979
commit
ea5839c8fe
1 changed files with 1 additions and 1 deletions
|
|
@ -113,7 +113,7 @@ __glapi_gentable_set_remaining_noop(struct _glapi_table *disp) {
|
||||||
|
|
||||||
struct _glapi_table *
|
struct _glapi_table *
|
||||||
_glapi_create_table_from_handle(void *handle, const char *symbol_prefix) {
|
_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];
|
char symboln[512];
|
||||||
|
|
||||||
if(!disp)
|
if(!disp)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue