6} Choose correct Data Types If you restrict something then check that the value is within the assumed range.
Many exploits might take advantage of giving values outside what was once thought a reasonable range. As an aside, arbitrary string length in dynamic languages such as Perl can often help.