Difference between revisions of "Cpp Coding Standards/SECURITY/BuffOver"

From Apache OpenOffice Wiki
Jump to: navigation, search
m
(No difference)

Revision as of 18:34, 22 May 2007

Check range and validity of buffers before you write into them. Always pass buffer sizes to functions. Always check buffer limits in loops, and don't rely on special markers in data that might come from the outside. Don't use functions that don't have a buffer size argument (see unsafe functions). A malicious attacker would otherwise be able to write into memory that might later directly or indirectly execute hostile code.

See also David Wheeler's excellent Secure Programming for Linux and Unix HOWTO.

Personal tools