《Secure Coding in C and C++》读书笔记-第六章-格式化输出
目录:
1. Running with Scissors
2.Strings
3.Pointer Subterfuge
4.Dynamic Memory Management
5.Integer Security
6.Formatted Output
7.Concurrency
8.File I/O
9.Recommended Practices
6.Formatted Output
代码举例:
void usage(char* pname){
char usageStr[1024];
snprintf(usageStr,1024,"Usage:%s<target>'n",pname);
printf(usageStr);
}