mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 23:40:10 +01:00
freedreno/rnndec: Avoid making 0-length variable length arrays.
ubsan hates it. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6360>
This commit is contained in:
parent
bd8bfe43fa
commit
ba9e994034
1 changed files with 1 additions and 1 deletions
|
|
@ -418,7 +418,7 @@ static struct rnndecaddrinfo *trymatch (struct rnndeccontext *ctx, struct rnndel
|
|||
offset = addr - (elems[i]->offset + elems[i]->stride * idx);
|
||||
int extraidx = (elems[i]->length != 1);
|
||||
int nindnum = (elems[i]->name ? 0 : indicesnum + extraidx);
|
||||
uint64_t nind[nindnum];
|
||||
uint64_t nind[MAX2(nindnum, 1)];
|
||||
if (!elems[i]->name) {
|
||||
for (j = 0; j < indicesnum; j++)
|
||||
nind[j] = indices[j];
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue