Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.

Channels ▼

Developer Reading List

, July 01, 2014 The best summer reads.
  • E-mail
  • Print

The CERT C Coding Standard, 2nd Ed.

by Robert Seacord

The author, Robert Seacord, works at Carnegie-Mellon University's CERT (Computer Emergency Readiness Team), which has for decades been at the center of the fight against black hat hackers. He has an unparalleled reputation for putting out some of the best, if also the dullest, books of secure coding rules. They all use the same general approach: a catalog of mostly rules that, if followed faithfully, will reduce the number of exploitable opportunities in your code. This book follows in that long tradition. It contains 98 rules for C programming with examples of problems (termed "non-compliant" code) and the remediating counter-examples followed by a military-like classification system in which severity, likelihood, remediation cost, and priority are all assessed and presented in endless categorization details.

However, because of Seacord's unremitting thoroughness and clarity, the books occupy an important place in the coding literature. Every organization that codes in C should, in my view, obtain a copy of this book and thoughtfully incorporate its recommendations into their coding standards. What Seacord does not say, but should say, is that most sites' coding standards focus heavily on syntax, while offering minimal guidance on topics like security. Moreover, most experts would agree that sites rarely have the talent in-house to formulate secure-coding rules correctly, so they are incapable of properly formulating the necessary guidelines even if they are so disposed. That is where this book comes in. It is a fairly complete (could it ever be entirely complete?) compendium, useful for both reference and for excerpting into in-house standards and enforcing in code reviews. For that purpose, I prefer it to Seacord's earlier Secure Coding in C and C++, which I reviewed last year. While the latter book is more readable (it's thematic, rather than a reference resource), it is less adoptable by organizations in need.

Few developers, especially in regulated industries, would disagree that programmers need to learn to code automatically using secure techniques and hardened functions — most especially in C. This volume, which at 512 pages provides all the necessary detail, is bound to get them across the river Jordan to that happy, secure place. Definitely recommended.

Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.