Hello. I was playing around with gets(), specifically because its supposed to be insecure. The program accepts a string of 5 chars, and is only there for me to be able to play with what happens with an overflow. I compiled using gcc.

When I executed the program it gives me a stack smashing detected error which I read is something gcc does to protect against buffer overflows. I was trying to see if I could issue the ls command so I wrote in abcdels.

My question is this: If gcc did not protect against buffer overflows would this have worked? After entering my characters would I have gotten a directory listing? Thanks for any interesting discussion or topics that are related to this.