Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
Demo033
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
CS Lab Group
实验项目模板
演示模板
Demo033
提交
1e2da1dc
提交
1e2da1dc
12月 13, 2018
创建
作者:
赵鹏翀
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
init template
上级
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
61 行增加
和
0 行删除
+61
-0
.gitignore
.gitignore
+3
-0
Demo033.csproj
Demo033.csproj
+31
-0
Demo033.puo
Demo033.puo
+0
-0
console.c
console.c
+18
-0
console.h
console.h
+9
-0
没有找到文件。
.gitignore
0 → 100644
浏览文件 @
1e2da1dc
/Debug
/Release
\ No newline at end of file
Demo033.csproj
0 → 100644
浏览文件 @
1e2da1dc
<?xml version="1.0" encoding="gb2312"?>
<ASMProject
Version=
"1.00"
Name=
"Demo033"
TemplatePath=
"console(c)\Project"
ProjectID=
"05423ddc-dc0c-4fe4-ac20-d2c36d36a5e8"
IsSubmitWork=
"0"
>
<Configurations>
<Configuration
Name=
"Debug"
DebuggerFlavor=
"0"
>
<Tool
Name=
"PreBuildEventTool"
/>
<Tool
Name=
"CustomBuildTool"
/>
<Tool
Name=
"GCCCompilerTool"
PreprocessorDefinitions=
"_DEBUG"
GenerateDebugInformation=
"-1"
LanguageStandard=
"c99"
/>
<Tool
Name=
"PreLinkEventTool"
/>
<Tool
Name=
"GCCLinkerTool"
/>
<Tool
Name=
"PostBuildEventTool"
/>
</Configuration>
<Configuration
Name=
"Release"
DebuggerFlavor=
"0"
>
<Tool
Name=
"PreBuildEventTool"
/>
<Tool
Name=
"CustomBuildTool"
/>
<Tool
Name=
"GCCCompilerTool"
PreprocessorDefinitions=
"NDEBUG"
LanguageStandard=
"c99"
/>
<Tool
Name=
"PreLinkEventTool"
/>
<Tool
Name=
"GCCLinkerTool"
StripDebugInfo=
"-1"
/>
<Tool
Name=
"PostBuildEventTool"
/>
</Configuration>
</Configurations>
<Files>
<Filter
Name=
"ͷļ"
Filter=
"h;hpp;hxx"
>
<File
RelativePath=
".\console.h"
>
</File>
</Filter>
<Filter
Name=
"Դļ"
Filter=
"cpp;c;cc;cxx"
>
<File
RelativePath=
".\console.c"
>
</File>
</Filter>
</Files>
</ASMProject>
Demo033.puo
0 → 100644
浏览文件 @
1e2da1dc
添加文件
console.c
0 → 100644
浏览文件 @
1e2da1dc
#include "stdio.h"
#include "stdlib.h"
void
buf_overflow
(
void
)
/*这个函数没有任何地方调用过*/
{
printf
(
"缓冲区溢出,返回地址被修改!
\n
"
);
exit
(
0
);
}
int
main
(
int
argc
,
char
*
argv
[])
// 一个简短的缓冲区溢出小程序
{
int
buff
[
1
];
buff
[
2
]
=
(
int
)
buf_overflow
;
// 将buf_overflow的地址入栈,当ret指令执行后,跳转到buf_overflow处执行
return
0
;
}
console.h
0 → 100644
浏览文件 @
1e2da1dc
#ifndef _CONSOLE_H_
#define _CONSOLE_H_
#include <stdio.h>
/* TODO: 在此处引用程序需要的其他头文件 */
#endif
/* _CONSOLE_H_ */
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论