Fixing potential buffer overrun errors.

Change-Id: I77c43f0dd3a5d5a54465ff5d562f8e2b4d7fa3c3
diff --git a/rsType.cpp b/rsType.cpp
index 52e0d52..79cfd41 100644
--- a/rsType.cpp
+++ b/rsType.cpp
@@ -145,6 +145,10 @@
 
 void Type::makeGLComponents()
 {
+    if(getElement()->getFieldCount() >= RS_MAX_ATTRIBS) {
+        return;
+    }
+
     uint32_t userNum = 0;
 
     for (uint32_t ct=0; ct < getElement()->getFieldCount(); ct++) {