Fix buffer overrun when ps string is longer than 1023.
Fix buffer overrun when ps string is longer than 1023.

In reality this could hardly occur, but bug is a bug.
Per Coverity report 1111427 "Out-of-bounds write".

treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres,treasure-data/prestogres