diff options
| author | 2010-07-20 11:01:34 -0700 | |
|---|---|---|
| committer | 2010-07-20 11:01:34 -0700 | |
| commit | aee71b4ea123d94da86759354d10fa57a04b5304 (patch) | |
| tree | fa52786cac9901955e0322c8389129365affb37a /libs/rs | |
| parent | 0ef7da159d2dcb469985291aaaedcd717c1c02b8 (diff) | |
| parent | 1e37e875efa2adfb93c86d4d1dcdf097b12be12e (diff) | |
Merge "Fixing potential buffer overrun errors."
Diffstat (limited to 'libs/rs')
| -rw-r--r-- | libs/rs/rsType.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libs/rs/rsType.cpp b/libs/rs/rsType.cpp index 52e0d52efa40..79cfd412c145 100644 --- a/libs/rs/rsType.cpp +++ b/libs/rs/rsType.cpp @@ -145,6 +145,10 @@ uint32_t Type::getLODOffset(uint32_t lod, uint32_t x, uint32_t y, uint32_t z) co void Type::makeGLComponents() { + if(getElement()->getFieldCount() >= RS_MAX_ATTRIBS) { + return; + } + uint32_t userNum = 0; for (uint32_t ct=0; ct < getElement()->getFieldCount(); ct++) { |