I picked up another book on secure programming today.
This one is Secure Programming Cookbook for C and C++ by John Viega & Matt Messier.
Even if you don't program in C or C++, this looks to be a very good read. There are sections on Cryptography, Authentication, Input Validation, and one of the best sections on Random Numbers I have ever seen.
O'Reilly has some sample articles from a chapter in the book:
Basic data validation techniques
Update: John Viega (one of the authors) has noted that there will be new and updated recipes on the site http://www.secureprogramming.com. Take a look.