A pointer to `char buf[...]' is taken, the array being declared in a
block scope inside the function. The pointer is passed to strdup(3) as
the function returned, but the array is by then out of scope. Move the
array to the function's scope. Fixes 0c50c669.