This was a small c function that returns a pointer to a character in a buffer. Find the problem.
Anonymous
The problem was the function returned a pointer that was declared locally (it would be on the stack) and it would be invalid after the function returns.
Check out your Company Bowl for anonymous work chats.