mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-27 14:50:10 +01:00
nouveau/ws: bound check nouveau_ws_push_append
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24326>
This commit is contained in:
parent
6f702f9939
commit
c791fae67b
1 changed files with 3 additions and 0 deletions
|
|
@ -94,6 +94,9 @@ nouveau_ws_push_append(struct nouveau_ws_push *push,
|
|||
assert(other->bos.size == 0);
|
||||
|
||||
size_t count = other->map - other->orig_map;
|
||||
|
||||
assert(push->map + count <= push->end);
|
||||
|
||||
memcpy(push->map, other->orig_map, count * sizeof(*push->map));
|
||||
push->map += count;
|
||||
push->last_size = NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue