Verify component count is in the legal range.
Change-Id: I50a18f9c8a5d4aac8e9b246b751dceca343991cc
diff --git a/modules/glshared/glsDrawTest.cpp b/modules/glshared/glsDrawTest.cpp
index 64baf81..69e4f22 100644
--- a/modules/glshared/glsDrawTest.cpp
+++ b/modules/glshared/glsDrawTest.cpp
@@ -1655,6 +1655,8 @@
template<typename T, typename GLType>
char* RandomArrayGenerator::createBasicArray (int seed, int elementCount, int componentCount, int offset, int stride)
{
+ DE_ASSERT(componentCount >= 1 && componentCount <= 4);
+
const GLType min = extractGLValue<GLType>(GLValue::getMinValue(GLValueTypeTraits<GLType>::Type));
const GLType max = extractGLValue<GLType>(GLValue::getMaxValue(GLValueTypeTraits<GLType>::Type));
@@ -1700,6 +1702,7 @@
char* RandomArrayGenerator::generatePackedArray (int seed, int elementCount, int componentCount, int offset, int stride)
{
+ DE_ASSERT(componentCount == 4);
DE_UNREF(componentCount);
const deUint32 limit10 = (1 << 10);