I came across lot of functions returning char pointers in one legacy application. Some of them returning pointers to local character arrays. It seems to be causing crashes a
Never return a pointer to local variable. It may work in some situations, but in general you will have lots of problems with it. Instead: