Hotfix for CVE-2021-43518. Closes #2981.
Adding all the datafile validation (#2931) ended up being a rather large patch and it still needs some work. This hotfix just addresses the exploitable stack buffer overflow write.
Fixing the other issues individually would be pointless, as there are at least 50-100 more distinct maps that can crash the client or cause ASAN/UBSAN errors.