avoid the stack-smasher strcpy-alloca and minor cleanup

(cherry picked from commit 605c36323486581f4a3016b8a165d6e28e9157f4)

Conflicts:
	src/dump.c
	src/task.c