Add test coverage for CVE-2006-6301 and CVE-2007-5715

This code isn't vulnerable to the DoS attack described in in CVE-2007-5715,
but that's because the regex wasn't correctly patched.