Lifetime of pointers value

PaulS:

As Markt said returning a pointer somthing on the stack is a very very bad idea.

I'm not sure that this statement is relevant, since the code never actually returns a pointer to something on the stack.

The code stores a pointer to a local variable (which is on the stack), but that pointer is only referenced while the local variable is in scope, so that stack space is never available to be overwritten.

Now, the code could be rearranged so that wasn't the case, but, as-is the code is perfectly safe.

Really? What's your take on this statement?

  buffer[1] = local_string;