add space for terminating null to fix AIX memory corruption

(cherry picked from commit 4c24a79c3387b4edc1e25bfb3415b925cba13c22)