summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-02-12 03:04:21 +0100
committerMarek Olšák <[email protected]>2011-02-12 03:08:39 +0100
commit20a78b68a3271d7a66fdf1e55c5882b8c12dfb8d (patch)
treee59d6433e9aff23911b9a3f2c040a1fb7c4b6a73 /src/gallium/auxiliary/util
parent3803295fc2b9c517e80aa46f2338308e23e64e4a (diff)
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.
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_vbuf_mgr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_vbuf_mgr.c b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index ca3b4dc4c4e..5f5a554e331 100644
--- a/src/gallium/auxiliary/util/u_vbuf_mgr.c
+++ b/src/gallium/auxiliary/util/u_vbuf_mgr.c
@@ -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) {