mesa/src/mapi/glapi/gen
Adam Jackson a1c5cd426c glapi/glx: Add overflow checks to the client-side indirect code
Coverity complains that the computed sizes can lead to negative lengths
passed to memcpy. If that happens we've been handed invalid arguments
anyway, so just bomb out.

The funky "0%s" is because the size string for the variable-length part
of the request is of the form "+ safe_pad() ...", and a unary + would
coerce the result to always be positive, defeating the overflow check.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2016-06-08 14:39:46 -04:00
..
AMD_draw_buffers_blend.xml glapi: add functions for AMD_draw_buffers_blend 2011-05-03 00:35:50 +02:00
AMD_performance_monitor.xml mesa: Fix a typo in AMD_performance_monitor enum. 2015-12-01 10:24:16 -08:00
apiexec.py mesa: add OES_texture_buffer and EXT_texture_buffer support 2016-03-28 20:29:29 -04:00
APPLE_object_purgeable.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
APPLE_vertex_array_object.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_base_instance.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:23:33 -07:00
ARB_blend_func_extended.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_clear_buffer_object.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_clear_texture.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_clip_control.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_color_buffer_float.xml mesa: Standardize names of OpenGL functions. 2012-11-12 10:53:57 -08:00
ARB_compressed_texture_pixel_storage.xml glapi: Add XML infrastructure for ARB_compressed_texture_pixel_storage 2014-06-10 07:38:38 +12:00
ARB_compute_shader.xml gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions 2015-05-28 16:56:31 -07:00
ARB_copy_buffer.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_copy_image.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
ARB_debug_output.xml mesa: make ARB_debug_output functions an alias of 2014-03-08 15:38:31 +11:00
ARB_depth_buffer_float.xml glapi: add GL_ARB_depth_buffer_float 2012-03-26 21:35:04 +00:00
ARB_depth_clamp.xml glapi: Move to src/mapi/. 2010-05-07 10:41:11 +08:00
ARB_direct_state_access.xml glapi: remove the final function offset tags 2016-03-09 17:16:51 +00:00
ARB_draw_buffers.xml mesa: Standardize names of OpenGL functions. 2012-11-12 10:53:57 -08:00
ARB_draw_buffers_blend.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_draw_elements_base_vertex.xml mesa: expose support for OES/EXT_draw_elements_base_vertex to OpenGL ES 2015-11-01 23:02:06 -05:00
ARB_draw_indirect.xml gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions 2015-05-28 16:56:31 -07:00
ARB_draw_instanced.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_ES2_compatibility.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_ES3_compatibility.xml glapi: Add enums for ARB_ES3_compatibility 2013-01-10 10:57:50 -08:00
ARB_framebuffer_no_attachments.xml mesa: Expose GL_ARB_framebuffer_no_attachments to GLES 3.1 2015-09-01 08:19:11 +03:00
ARB_framebuffer_object.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:23:33 -07:00
ARB_get_program_binary.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_get_texture_sub_image.xml glapi: remove the final function offset tags 2016-03-09 17:16:51 +00:00
ARB_gpu_shader5.xml glapi: add definitions for ARB_gpu_shader5 2014-02-06 16:58:33 -08:00
ARB_gpu_shader_fp64.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_indirect_parameters.xml glapi: add ARB_indirect_parameters definitions 2016-01-07 18:38:46 -05:00
ARB_instanced_arrays.xml mesa: Standardize names of OpenGL functions. 2012-11-12 10:53:57 -08:00
ARB_internalformat_query.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_internalformat_query2.xml mesa: Add dispatch and extension XML for GL_ARB_internalformat_query2 2016-03-03 15:14:06 +01:00
ARB_invalidate_subdata.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_map_buffer_range.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_multi_bind.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_pipeline_statistics_query.xml mesa: Add support for the ARB_pipeline_statistics_query extension 2015-02-17 23:01:11 -08:00
ARB_program_interface_query.xml gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions 2015-05-28 16:56:31 -07:00
ARB_robustness.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_sample_shading.xml mesa: Add new functions and enums required by GL_ARB_sample_shading 2013-11-01 16:01:47 -07:00
ARB_sampler_objects.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
ARB_seamless_cube_map.xml glapi: Fix incorrect enum value. 2012-02-23 09:35:44 -08:00
ARB_separate_shader_objects.xml gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions 2015-05-28 16:56:31 -07:00
ARB_shader_atomic_counters.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_shader_image_load_store.xml gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions 2015-05-28 16:56:31 -07:00
ARB_shader_storage_buffer_object.xml glapi: add ARB_shader_storage_block_buffer_object 2015-09-25 08:39:23 +02:00
ARB_shader_subroutine.xml glapi: remove the final function offset tags 2016-03-09 17:16:51 +00:00
ARB_sync.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_tessellation_shader.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
ARB_texture_barrier.xml mesa: add ARB_texture_barrier support 2014-08-14 20:25:32 -04:00
ARB_texture_buffer_object.xml mesa: Standardize names of OpenGL functions. 2012-11-12 10:53:57 -08:00
ARB_texture_buffer_range.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
ARB_texture_compression_rgtc.xml glapi: add GL_ARB_texture_compression_rgtc 2012-03-26 21:28:25 +00:00
ARB_texture_cube_map_array.xml glapi: add ARB_texture_cube_map_array. 2012-11-09 09:24:41 +10:00
ARB_texture_float.xml glapi: add GL_ARB_texture_float 2012-03-26 21:35:17 +00:00
ARB_texture_gather.xml mesa: fix make check for ARB_texture_gather 2013-10-03 21:38:48 +13:00
ARB_texture_multisample.xml gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions 2015-05-28 16:56:31 -07:00
ARB_texture_rg.xml glapi: add ARB_texture_rg 2012-03-26 21:28:25 +00:00
ARB_texture_rgb10_a2ui.xml glapi: add ARB_texture_rgb10_a2ui support. 2011-11-27 16:25:12 +00:00
ARB_texture_storage.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_texture_storage_multisample.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
ARB_texture_view.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_uniform_buffer_object.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_vertex_array_object.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_vertex_attrib_64bit.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
ARB_vertex_attrib_binding.xml gles/es3.1: Enable dispatch of almost all new GLES 3.1 functions 2015-05-28 16:56:31 -07:00
ARB_vertex_type_2_10_10_10_rev.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:23:33 -07:00
ARB_viewport_array.xml glapi/gen: Copy some GL 1.0 enum details into ARB_viewport_array 2016-05-17 15:04:56 -04:00
es_EXT.xml i965: Enable GL_KHR_robustness 2016-05-25 09:41:44 -07:00
EXT_draw_buffers2.xml mesa: Standardize names of OpenGL functions. 2012-11-12 10:53:57 -08:00
EXT_framebuffer_object.xml mesa: Drop enums that had been removed in later revs of specs. 2015-12-01 10:24:18 -08:00
EXT_gpu_shader4.xml glapi: add EXT_blend_func_extended XML definitions 2015-11-19 11:39:51 -05:00
EXT_packed_depth_stencil.xml glapi: Move to src/mapi/. 2010-05-07 10:41:11 +08:00
EXT_provoking_vertex.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
EXT_separate_shader_objects.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
EXT_texture_array.xml mesa: Standardize names of OpenGL functions. 2012-11-12 10:53:57 -08:00
EXT_texture_integer.xml mesa: add GL_EXT_texture_border_clamp support 2016-02-22 10:38:56 -05:00
EXT_transform_feedback.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
GL3x.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
GL4x.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
gl_and_es_API.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
gl_and_glX_API.xml glapi: Move to src/mapi/. 2010-05-07 10:41:11 +08:00
gl_API.dtd glapi: Remove offset from the DTD 2015-05-15 20:23:34 -07:00
gl_API.xml i965: Enable GL_KHR_robustness 2016-05-25 09:41:44 -07:00
gl_apitemp.py glapi: gl_apitemp.py: Use a main function 2015-05-22 11:31:27 -07:00
gl_enums.py glapi: work-around MSVC 65K string length limitation for enums.c 2015-12-01 14:28:45 -07:00
gl_genexec.py mesa: move GL_ARB_debug_output code into new debug_output.c file 2016-02-08 09:29:38 -07:00
gl_gentable.py mesa: Reduce libGL.so binary size by about 15% 2016-01-21 15:03:53 +01:00
gl_procs.py glapi: Avoid argparse type argument for API XML input files. 2015-05-26 15:26:03 +01:00
gl_SPARC_asm.py glapi: gl_SPARC_asm.py: use main function 2015-05-22 11:31:28 -07:00
gl_table.py glapi: gl_table.py: remove unused variable 'es' 2015-06-23 16:56:50 +01:00
gl_x86-64_asm.py glapi: Remove _x86_64_get_get_dispatch symbol from x86-64 assembly. 2015-08-27 22:28:49 -07:00
gl_x86_asm.py glapi: gl_x86_asm.py: use a main function 2015-05-22 11:31:27 -07:00
gl_XML.py glapi: Define PURE for Sun Studio as well 2016-05-17 15:04:56 -04:00
glX_API.xml glapi: Mark GLX extensions as window_system="glX". 2012-11-06 12:57:40 -08:00
glX_proto_common.py mapi/glapi: Use ElementTree instead of libxml2. 2014-03-26 13:51:32 +00:00
glX_proto_recv.py glapi/glx: Mark byteswap functions as _X_UNUSED (v2) 2016-05-17 15:04:56 -04:00
glX_proto_send.py glapi/glx: Add overflow checks to the client-side indirect code 2016-06-08 14:39:46 -04:00
glX_proto_size.py glapi: Harden GLX request size processing (v2) 2016-05-17 15:04:56 -04:00
glX_server_table.py glapi: glX_server_table.py: use argparse instead of getopt 2015-05-22 11:31:28 -07:00
glX_XML.py glapi: Harden GLX request size processing (v2) 2016-05-17 15:04:56 -04:00
GREMEDY_string_marker.xml mesa: add GREMEDY_string_marker 2016-01-21 17:19:05 -05:00
INTEL_performance_query.xml glapi: Remove all offset tags from the XML 2015-05-15 20:23:31 -07:00
KHR_context_flush_control.xml mesa: Add support for the GL_KHR_context_flush_control extension 2014-10-28 16:40:18 +00:00
KHR_debug.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
KHR_robustness.xml mapi: expose new functions in GL ES 3.2 2016-05-26 21:25:53 -04:00
KHR_robustness_es.xml i965: Enable GL_KHR_robustness 2016-05-25 09:41:44 -07:00
KHR_texture_compression_astc.xml glapi: add support for KHR_texture_compression_astc_ldr 2015-08-26 14:36:42 -07:00
license.py glapi: Move to src/mapi/. 2010-05-07 10:41:11 +08:00
Makefile.am i965: Enable GL_KHR_robustness 2016-05-25 09:41:44 -07:00
next_available_offset.sh glapi: Move to src/mapi/. 2010-05-07 10:41:11 +08:00
NV_conditional_render.xml mesa: Standardize names of OpenGL functions. 2012-11-12 10:53:57 -08:00
NV_primitive_restart.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:23:33 -07:00
NV_texture_barrier.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:23:33 -07:00
NV_vdpau_interop.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:23:33 -07:00
OES_EGL_image.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:23:33 -07:00
OES_fixed_point.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:23:33 -07:00
OES_single_precision.xml glapi: Whitespace clean up after the previous commit 2015-05-15 20:22:40 -07:00
OES_texture_compression_astc.xml glapi: Update dispatch XML files for OES_texture_compression_astc.xml 2016-05-03 03:43:18 -07:00
remap_helper.py glapi: remap_helper.py: remove unused argument 'es' 2015-06-23 16:57:27 +01:00
SConscript mapi: Fix enums.c build with other build systems. 2015-12-01 12:19:02 -08:00
static_data.py glapi: Add a list of functions that are not used but still need dispatch slots 2015-05-15 20:23:20 -07:00
typeexpr.py glapi: use new-style Python classes. 2012-10-16 12:03:55 -07:00