Amo*_*wal 1 c buffer-overflow
#include <stdio.h> #include <stdlib.h> #include <string.h> int main() { char *a = "Hello "; const char *b = "World"; printf("%s", strcat(a, b)); system("PAUSE"); return EXIT_SUCCESS; }
Did*_*set 7
因为您在不拥有的内存位置写入数据.
实际上,在运行strcat时,您将在字符串a的字符后面追加字符串b的字符.但你没有声称字符串后的内存.
归档时间:
16 年,3 月 前
查看次数:
121 次
最近记录: