Question: The C standard library is notoriously poor when it comes to I/O safety. Many functions have buffer overflows (`gets`, `scanf`), or can clobber memory if not given proper arguments (`scanf`), and so on. Every once in a while, I come across an enterprising hacker who has written his own library that lacks these flaws.

What are the best of these libraries you have seen? Have you used them in production code, and if so, which held up as more than hobby projects?

Answer: 
For Windows there is a ['safe' C/C++ library](http://msdn.microsoft.com/en-us/magazine/cc163794.aspx).
You're always at liberty to implement any library you like and to use it - the hard part is making sure it is available on the platforms you need your software to work on. You can also use wrappers around the standard functions where appropriate.

Whether it is really a good idea is somewhat debatable, but there is TR24731 published by the C standard committee - for a safer set of C functions. There's definitely some good stuff in there. See this question: [Do you use the TR 24731 Safe Functions in your C code?](https://stackoverflow.com/questions/372980/do-you-use-the-tr-24731-safe-functions-in-your-c-code), which includes links to the technical report.