fix out of boundary when strcpy (#1173)

* fix out of boundary when strcpy, fix #1170

* fix format check failure

* fix format check error
1 file changed