4 ms·
I read programming pearls about halfway until I discovered that a several of the samples were using gets() and could be trivially exploited for buffer overflows
by nn2 15y ago
I read programming pearls about halfway until I discovered that a several of the samples were using gets() and could be trivially exploited for buffer overflows.
Calling programs like that "pearls" just seemed too wrong to me to go on.
- edwinnathaniel 15y agoAs to my understanding, Programming Pearls focused lies between the range of elegant code and algorithms/problem solving as opposed to secured coding practice in the C programming language.
- lwat 15y agoStill, someone like Knuth will argue that correctness should not be sacrificed for elegance.
- edwinnathaniel 15y agoFeel free to crucify John Bentley. I know I'll learn more out of the book if I don't care of the small nitpicks like "gets()".
- sanxiyn 15y agoIIRC the book actually has a section where the author explains why he uses gets(), short variable names, etc.