summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pt_vcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_vcache.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_vcache.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_vcache.c b/src/gallium/auxiliary/draw/draw_pt_vcache.c
index 1a0527be63..757c487454 100644
--- a/src/gallium/auxiliary/draw/draw_pt_vcache.c
+++ b/src/gallium/auxiliary/draw/draw_pt_vcache.c
@@ -346,7 +346,8 @@ vcache_check_run( struct draw_pt_front_end *frontend,
vcache->fetch_max,
draw_count);
- if (max_index == 0xffffffff ||
+ if (max_index >= DRAW_PIPE_MAX_VERTICES ||
+ fetch_count >= UNDEFINED_VERTEX_ID ||
fetch_count > draw_count) {
if (0) debug_printf("fail\n");
goto fail;
@@ -394,6 +395,7 @@ vcache_check_run( struct draw_pt_front_end *frontend,
default:
assert(0);
+ FREE(storage);
return;
}
}
@@ -422,6 +424,7 @@ vcache_check_run( struct draw_pt_front_end *frontend,
default:
assert(0);
+ FREE(storage);
return;
}
}