Add array size check to avoid out-of-range crash.
Add array size check to avoid out-of-range crash.

plusky/spec-cleaner,pombredanne/spec-cleaner,pombredanne/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner,plusky/spec-cleaner