C validating input char christian dating service alabama

Rated 4.12/5 based on 634 customer reviews

Because we assume that you are a C or C programmer, we won’t insult your intelligence by explaining buffer overflows to you.

I question your use of exceptions to catch the invalid input.

I also think that when you fail, you should inform the user of that, reset the input stream, and give them another chance, rather than just exiting.

Also, sure this is just a toy, but in a real program you should separate the business logic of your program from the input and output.

You may want to rely on operational protections (such as Stack Guard from Immunix), use a library for safe string handling, or even use a different programming language.

Buffer overflows get a lot of attention in the technical world, partially because they constitute one of the largest classes of security problems in code, but also because they have been around for a long time, are easy to get rid of, and yet still are a huge problem.

Leave a Reply