Don't read off end of indices buffer data if it's not big enough

* Fix for uploaded crash report.