projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3803295
)
u_vbuf_mgr: fix segfault
author
Marek Olšák
<maraeo@gmail.com>
Sat, 12 Feb 2011 02:04:21 +0000
(
03:04
+0100)
committer
Marek Olšák
<maraeo@gmail.com>
Sat, 12 Feb 2011 02:08:39 +0000
(
03:08
+0100)
max_index could have been less than min_index, which later caused integer
underflow followed by a segfault in memcpy.
src/gallium/auxiliary/util/u_vbuf_mgr.c
patch
|
blob
|
history
diff --git
a/src/gallium/auxiliary/util/u_vbuf_mgr.c
b/src/gallium/auxiliary/util/u_vbuf_mgr.c
index ca3b4dc4c4e9eb6329b470caa27d803eb6fcdefa..5f5a554e331f66f6b5c9112cc9d21d4c489bcd32 100644
(file)
--- 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) {