Buffer overflow: Difference between revisions

Content deleted Content added
No edit summary
Line 97:
 
Some CPUs such as Sun's Sparc, Transmeta's Efficeon, and newer 64-bit Intel and AMD x86 processors prevent code from being executed on areas of memory flagged with a special [[NX bit]].
 
===Use of safe libraries===
The problem of buffer overflows is commonly manifest in the [[C programming language|C]] and [[C Plus Plus|C++]] languages because they expose low level representational details of buffers as containers for datatypes. Buffer overflows are thus avoided by maintaining a high degree of correctness in code which performs buffer management. Well written and tested abstract data type libraries which centralize and automatically perform buffer management and include overflow testing is one engineering approach to mitigating the effect of buffer overflows. The two main building block data types in these languages in which buffer overflows are commonly manifest are strings and arrays, thus use of string and list-like data structure libraries which have been architected to avoid and/or detect buffer overflows provide the vast majority of the necessary coverage.
 
===Choice of programming language===