mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-23 06:10:23 +01:00
r600: Fix stack overflow
Commit7b5878ee04increased number of outputs to 64, but left output array intact. This caused stack overflow when number of outputs is bigger then 32. Found by ASAN. Cc: "12.0 13.0 17.0" <mesa-stable@lists.freedesktop.org> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> (cherry picked from commita41f2527ae)
This commit is contained in:
parent
68d18cccff
commit
697cf3c720
1 changed files with 1 additions and 1 deletions
|
|
@ -2924,7 +2924,7 @@ static int r600_shader_from_tgsi(struct r600_context *rctx,
|
|||
struct pipe_stream_output_info so = pipeshader->selector->so;
|
||||
struct tgsi_full_immediate *immediate;
|
||||
struct r600_shader_ctx ctx;
|
||||
struct r600_bytecode_output output[32];
|
||||
struct r600_bytecode_output output[ARRAY_SIZE(shader->output)];
|
||||
unsigned output_done, noutput;
|
||||
unsigned opcode;
|
||||
int i, j, k, r = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue