GCC 4.8 warning array subscript is above array bounds fixed.

(cherry picked from commit e11333dd831ef43f962e513e26f3dfa6dc789155)