wtv: Add more sanity checks for a length read from the file