fix undefined behavior with out-of-bounds substring access
fix undefined behavior with out-of-bounds substring access

Change-Id: Ie40d3dd2947d41b62eae84f20cfe457d69cc4bfe

JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core