At one point I made an attempt to do this from the CVE database, but it's difficult to do since CVEs aren't really machine readable from a "memory safety vs. other security flaws" perspective. I recall finding a lot of reported vulns with buffer, overflow, null pointer dereference, double free, etc., but that's far from scientific.