Fix CVE-2009-0858 by Matthew Dempsky

More information can be read at:

http://article.gmane.org/gmane.network.djbdns/13864
http://www.securityfocus.com/archive/1/archive/1/501294/100/0/threaded

Signed-off-by: Giam Teck Choon <giamteckchoon@gmail.com>