vim before patch 8.0.0322 does not properly validate values for tree length when handling a spell file, which may result in an integer overflow at a memory allocation site and a resultant buffer overflow.
https://usn.ubuntu.com/4309-1/
https://usn.ubuntu.com/4016-1/
https://security.gentoo.org/glsa/201706-26
https://groups.google.com/forum/#%21topic/vim_dev/t-3RSdEnrHY
https://github.com/vim/vim/commit/399c297aa93afe2c0a39e2a1b3f972aebba44c9d