mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-09 14:28:18 +02:00
u_vbuf_mgr: fix segfault
max_index could have been less than min_index, which later caused integer underflow followed by a segfault in memcpy.
This commit is contained in:
parent
3803295fc2
commit
20a78b68a3
1 changed files with 1 additions and 1 deletions
|
|
@ -562,7 +562,7 @@ void u_vbuf_mgr_draw_begin(struct u_vbuf_mgr *mgrb,
|
|||
int min_index, max_index;
|
||||
|
||||
min_index = info->min_index - info->index_bias;
|
||||
max_index = MIN2(info->max_index, mgr->b.max_index) - info->index_bias;
|
||||
max_index = info->max_index - info->index_bias;
|
||||
|
||||
/* Translate vertices with non-native layouts or formats. */
|
||||
if (mgr->incompatible_vb_layout || mgr->ve->incompatible_layout) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue