Monday, October 21, 2013

5 security considerations when coding


5 Security Considerations When Coding


1. Input Checking

Always check user input to be sure that it is what you expected. Make sure it doesnt contain characters or other data which may be treated in a special way by your program or any programs called by your program.This often involves checking for characters such as quotes, and checking for unusual input characters such as non-alphanumeric characters where a text string is expected. Often, these are a sign of an attack of some kind being attempted.


security, coding, programming, php, hacking, c++, code, secure


1. Input Checking

Always check user input to be sure that it is what you expected. Make sure it doesnt contain characters or other data which may be treated in a special way by your program or any programs called by your program.This often involves checking for characters such as quotes, and checking for unusual input characters such as non-alphanumeric characters where a text string is expected. Often, these are a sign of an attack of some kind being attempted.

2.Range Checking

Always check the ranges when copying data, allocating memory or performing any operation which could potentially overflow. Some programming languages provide range-checked container access (such as the std::vector::at() in C++, but many programmers insist on using the unchecked array index [] notation. In addition, the use of functions such as strcpy() should be avoided in preference to strncpy(), which allows you to specify the maximum number of characters to copy. Similar versions of functions such as snprintf() as opposed to

 



Password Resetter - Reset Your Windows Password In 3 Steps



Recommended For You



No comments:

Post a Comment