Fixes for heap overflows CVE-2011-4516, CVE-2011-4517. From FreeBSD/Debian. While here, trim DESCR, routine cleanups.