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
No, it is undefined behaviour. It just happens to work in your case, but may stop working at any time.