Live data from Hacker News

Ask HN: Resources on secure coding in C?

news.ycombinator.com

11–14 of 14 posts

Re: Ask HN: Resources on secure coding in C?

#11
post #4

http://c.learncodethehardway.org/ by Zed Shaw is an introduction to C that seems to have emphasis on writing secure C programs. It's an introduction to C so I'm not sure if it's a comprehensive guide to security in C but it does aim to teach C with security in mind, especially buffer overflows.

Zed's advice is pretty controversial among the veteran C programmers I know, so I'd hesitate to recommend LCTHW except as an introduction to C rather than a security-minded thing.

Thanks. I'd actually be interested in hearing more about their opinion on the book, it'll help with my own development.

Re: Ask HN: Resources on secure coding in C?

#13
post #11

Earlier quoted context omitted.

Zed's advice is pretty controversial among the veteran C programmers I know, so I'd hesitate to recommend LCTHW except as an introduction to C rather than a security-minded thing.

Thanks. I'd actually be interested in hearing more about their opinion on the book, it'll help with my own development.

http://hentenaar.com/dont-learn-c-the-wrong-way

Re: Ask HN: Resources on secure coding in C?

#14
post #4

http://c.learncodethehardway.org/ by Zed Shaw is an introduction to C that seems to have emphasis on writing secure C programs. It's an introduction to C so I'm not sure if it's a comprehensive guide to security in C but it does aim to teach C with security in mind, especially buffer overflows.

I strongly encourage people to avoid Learn C the Hard Way. It's neither a good introduction to C nor a good guide to secure C. Reading through, I couldn't help but wince at the inaccuracies and oversights. I hate to say it, but the guide is irredeemable.

Who am I to say such things? Well... I learned C almost 20 years ago. I haven't spent the whole time since then writing it, but I'd like to think I'm pretty good. You may even use some of the stuff I've written, such as ag[1].

1. https://github.com/ggreer/the_silver_searcher

Post reply on HN