第一节 基本概念
Buffer Overflow——In computer security and programming, a buffer overflow, or buffer overrun, is an anomaly where a program, while writing data to a buffer, overruns the buffer’s boundary and overwrites adjacent memory locations.
From:Wikipedia
Html:https://en.wikipedia.org/wiki/Buffer_overflow
在计算机安全中,缓冲区溢出是指一种异常操作,即向缓冲区写数据时超过了该缓冲区的边界,覆盖了相邻的内存空间。
例1:test1.c
#include <stdio.h>
//This is test1.c for buffer overflow
void function(char *str) {
char buffer[10];
strcpy(buffer,str);
}
int main()
{
char string[]="Welcome to a new world!";
function(string);
return 0;
}
本文介绍了计算机安全领域中的缓冲区溢出概念,这是一种常见的安全漏洞,当程序向缓冲区写入超过其容量的数据时会发生。文章通过一个简单的C语言示例代码解释了这一现象。
1900

被折叠的 条评论
为什么被折叠?



