How to debug ‘Stack smashing detected’?

If you read the website you will realize that this is a simple C++ wrapper over a C library. A typical issue with C library are buffer overruns: Try this program: Because the buffer can only contain 16 characters, the remaining characters will be written past its end. This is stack smashing, and undefined behavior. A number … Read more

what is stack smashing (C)?

Code: Output: string-1 length = 7, char *a = StringA StringB *** stack smashing detected **** : /T02 terminated Aborted (core dumped) I don’t understand why it’s showing stack smashing? and what is *stack smashing? Or is it my compiler’s error?