augustin
augustin

Reputation: 14729

C++: what are the most common vulnerabilities and how to avoid them?

As I code, I try to be security-conscious all the time. The problem is that I need to know what to look for and what to prevent.

Is there a list somewhere of the most common (C++) software vulnerabilities and how to avoid them?

What about C++ software for specific uses, e.g. a linux console software or a web application?

Upvotes: 22

Views: 10823

Answers (3)

wkl
wkl

Reputation: 79901

Many resources are available, some in question are:

Upvotes: 17

1s2a3n4j5e6e7v
1s2a3n4j5e6e7v

Reputation: 1259

There are also problems such as 1. Segmentation Fault 2. Memory Leak 3. Memory Allocation errors, etc that might be of your concern...

Upvotes: 2

chrisaycock
chrisaycock

Reputation: 37930

This site may have links to what you are looking for:

http://www.deitel.com/ResourceCenters/Programming/C/CSecurity/tabid/1549/Default.aspx


I guess I'll add that one of the most common problems in C and C++ is buffer overflow:

http://en.wikipedia.org/wiki/Buffer_overflow#Use_of_safe_libraries

For that, use only functions that check boundaries, like strncpy() instead of strcpy().

Upvotes: 5

Related Questions