aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapi/stub.c
Commit message (Collapse)AuthorAgeFilesLines
* mapi: Make private copies of name strings provided by client.Mario Kleiner2015-03-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | glXGetProcAddress("glFoo") ends up in stub_add_dynamic() to create dynamic stubs for dynamic functions. stub_add_dynamic() doesn't store the caller provided name string "Foo" in a mesa private copy, but just stores a pointer to the "glFoo" string passed to glXGetProcAddress - a pointer into arbitrary memory outside mesa's control. If the caller passes some dynamically allocated/changing memory buffer to glXGetProcAddress(), or the caller gets unmapped from memory, e.g., some dynamically loaded application plugin which uses OpenGL, this ends badly - with a dangling pointer. strdup() the name string provided by the client to avoid this problem. Cc: "10.3 10.4 10.5" <[email protected]> Signed-off-by: Mario Kleiner <[email protected]> Reviewed-by: Brian Paul <[email protected]>
* mapi: remove u_thread.hBrian Paul2015-03-051-11/+3
| | | | | | | Just use c11 threads directly. Reviewed-by: Matt Turner <[email protected]> Reviewed-by: José Fonseca <[email protected]>
* mapi: remove unneeded ARRAY_SIZE #defineBrian Paul2015-03-041-1/+1
| | | | | | include util/macros.h instead. Reviewed-by: Jose Fonseca <[email protected]>
* glapi: remove u_mutex wrapper code, use c99 thread mutexes directlyBrian Paul2014-03-061-3/+3
| | | | | | v2: fix initializer mistake spotted by Chia-I Wu. Reviewed-by: Chia-I Wu <[email protected]>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <[email protected]>
* build: Move src/mapi/mapi/* to src/mapi/Matt Turner2013-04-151-0/+229
Tested-by: Emil Velikov <[email protected]> Reviewed-and-Tested-by: Andreas Boll <[email protected]> Reviewed-by: Jordan Justen <[email protected]>