Fix GCC7 warnings about string truncation