正在加载图片...
Problem:No Range Checking strcpy does not check input size strepy(buf,str)simply copies memory contents into buf starting from *str until10"is encountered,ignoring the size of area allocated to buf Many C library functions are unsafe -strcpy(char *dest,const char *src) -strcat(char *dest,const char *src) -gets(char *s) 一 scanf(const char *format,.. printf(const char *format,...) 99 Problem: No Range Checking  strcpy does not check input size ─ strcpy(buf, str) simply copies memory contents into buf starting from *str until “\0” is encountered, ignoring the size of area allocated to buf  Many C library functions are unsafe ─ strcpy(char *dest, const char *src) ─ strcat(char *dest, const char *src) ─ gets(char *s) ─ scanf(const char *format, …) ─ printf(const char *format, …)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有