Various miscellaneous bounds checking fixes
Submitted by Philip Withnall
None of these fix any real bugs — they’re all to pacify the static analyser, or are in tests or utilities. Still, they can’t hurt.
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information