A dedicated QA has been testing one of my application during the past few days. The good news is that fortunately, I'm still a qualified developer: the program design is solid, there is no design flaw and there is no data damage under exceptional conditions. The bad part is, I didn't pay enough attention to those details that I should have paid attention to. Here is a list of things, check how many of them are in your program:
- While using strtol or _strtoi64 to convert a user input string to numeric value, it returns the largest possible value when the number overflows. So if you use that as a criteria for overflow, you will miss out the largest value itself.
- We know port 0 through 1024 are reserved for system use, is 1024 included?
- Do you know that fopen can't open files that is located under a directory whose name contains non-ASCII characters?
- inet_addr accepts ip addresses like 10.0.1, and converts it to 10.0.1.0.
- Under what condition is “C:Temp“ a valid directory name?
打印 | 张贴于 2004-09-30 11:22:00 | Tag:乱谈
留言反馈