返回首页 我的新博客
摘要: 1. strcpy我们知道,strcpy 是依据 \0 作为结束判断的,如果 to 的空间不够,则会引起 buffer overflow。strcpy 常规的实现代码如下(来自 OpenBSD 3.9):char *strcpy(char *to, const char *from){ char *save = to; for (; (*to = *from) != '\0'; ++from, +... 阅读全文
posted @ 2009-06-01 15:35 buffer的blogs 阅读(3380) 评论(1) 推荐(0)