mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
fd/replay: Fix wrbuffer name extraction
The offset for reading and length calculation logic was incorrect leading to the name string being entirely incorrect. Signed-off-by: Mark Collins <mark@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28253>
This commit is contained in:
parent
1e27138588
commit
d043ebc941
1 changed files with 3 additions and 2 deletions
|
|
@ -1300,8 +1300,9 @@ override_cmdstream(struct device *dev, struct cmdstream *cs,
|
|||
uint64_t *p = (uint64_t *)ps.buf;
|
||||
wrbuf->iova = p[0];
|
||||
wrbuf->size = p[1];
|
||||
wrbuf->name = calloc(1, p[2]);
|
||||
memcpy(wrbuf->name, (char *)ps.buf + 3 * sizeof(uint64_t), p[2]);
|
||||
int name_len = ps.sz - (2 * sizeof(uint64_t));
|
||||
wrbuf->name = calloc(sizeof(char), name_len);
|
||||
memcpy(wrbuf->name, (char*)(p + 2), name_len); // includes null terminator
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue