Secure coding: Difference between revisions

Content deleted Content added
ref
Typo fixing, WP:TONE, typo(s) fixed: For example → For example, using AWB
Line 1:
{{Multiple issues|
{{UnreferencedRefimprove|date=MaySeptember 20082017}}
{{NoMore footnotes|date=September 2010}}
}}
 
Line 9:
 
== Buffer Overflow Prevention ==
[[Buffer overflow]]s, a common software security vulnerability, happen when a process tries to store data beyond a fixed-length buffer. For example, if youthere haveare 8 slots to store items in, andthere trywill tobe puta 9probelm itemsif youthere willis endan upattempt withto astore problem9 items. In computer memory the overflowed data may overwrite data in the next ___location which can result in a security vulnerability (stack smashing) or program termination (segmentation fault).<ref name="bss2001"/>
 
An example of a C program prone to a buffer overflow is<syntaxhighlight lang="c++">