Found in 2 comments on Hacker News
pjmlp · 2022-12-23 · Original thread
Learn C using the classical books, but also care about how to mitigate security issues while coding in C.

"Secure Coding in C and C++"

https://www.oreilly.com/library/view/secure-coding-in/978013...

"The CERT C Secure Coding Standard"

https://www.oreilly.com/library/view/the-cert-c/978032160319...

MISRA-C

https://www.misra.org.uk/

Frama-C

https://frama-c.com/

Also have a look at the static analysis and warnings available across all major C compilers.

pjmlp · 2020-09-04 · Original thread
I would add to that list,

"Secure Coding in C and C++, Second Edition"

https://www.oreilly.com/library/view/secure-coding-in/978013...

"Extreme C"

https://www.packtpub.com/product/extreme-c/9781789343625