Skip to content

asahi: Fix undefined behaviour with samplers

Alyssa Rosenzweig requested to merge alyssa/mesa:asahi/xonotic into main

bind_sampler_states doesn't zero [nr_samplers, PIPE_MAX_SAMPLERS) so can get non-null garbage samplers leading to a use-after-free (segfault derefencing sampler) or a buffer overflow (writing samplers[] out).

Fixes crashes in Xonotic.

Signed-off-by: Alyssa Rosenzweig alyssa@collabora.com Reported-by: dcow Tested-by: dcow

Merge request reports