Q :
What is the difference between a stack overflow and buffer overflow?
A :
Stack overflow refers specifically to the case when the execution stack grows beyond the memory that is reserved for it. For example, if you call a function which recursively calls itself without termination, you will cause a stack overflow as each function call creates a new stack frame and the stack will eventually consume more memory than is reserved for it.
Buffer overflow refers to any case in which a program writes beyond the end of the memory allocated for any buffer (including on the heap, not just on the stack). For example, if you write past the end of an array allocated from the heap, you've caused a buffer overflow.
출처 : https://stackoverflow.com/questions/1120575/what-is-the-difference-between-a-stack-overflow-and-buffer-overflow
'옥탑방주인 > -D' 카테고리의 다른 글
Android library - Bionic(libc)에 대해 알아보자. (0) | 2017.12.04 |
---|---|
Lesser General Public License(LGPL) (0) | 2017.12.04 |
Abstract Syntax Tree(AST) 추상구문트리란? (0) | 2017.10.17 |
Kali-linux에서 ifconfig 명령어가 동작하지 않을 시 (0) | 2017.09.01 |
AWS EC2에 Apache-Spark 올리기 (0) | 2017.06.16 |