diff --git a/src/nouveau/winsys/nouveau_push.c b/src/nouveau/winsys/nouveau_push.c index fcf1ea3848c..63ead9307cb 100644 --- a/src/nouveau/winsys/nouveau_push.c +++ b/src/nouveau/winsys/nouveau_push.c @@ -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;