summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2010-05-14 13:23:10 -0600
committerBrian Paul <brianp@vmware.com>2010-05-14 13:23:41 -0600
commit18ed479119321cafae527511f1bccea90b0dff03 (patch)
treea03f1ad6b8f20bfd4f288a7acda934b67a27af88 /src/gallium/auxiliary
parent11b7c4b1ac0093781f6631c17a5441bea0be93d4 (diff)
gallivm: added some vector length sanity checks
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/gallivm/lp_bld_type.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/gallivm/lp_bld_type.c b/src/gallium/auxiliary/gallivm/lp_bld_type.c
index 70ac755bbb..e6cd400c43 100644
--- a/src/gallium/auxiliary/gallivm/lp_bld_type.c
+++ b/src/gallium/auxiliary/gallivm/lp_bld_type.c
@@ -195,6 +195,7 @@ lp_uint_type(struct lp_type type)
{
struct lp_type res_type;
+ assert(type.length <= LP_MAX_VECTOR_LENGTH);
memset(&res_type, 0, sizeof res_type);
res_type.width = type.width;
res_type.length = type.length;
@@ -211,6 +212,7 @@ lp_int_type(struct lp_type type)
{
struct lp_type res_type;
+ assert(type.length <= LP_MAX_VECTOR_LENGTH);
memset(&res_type, 0, sizeof res_type);
res_type.width = type.width;
res_type.length = type.length;