We encode the size as a u32, so let's be sure the size does not exceed that storage. This is unlikely to happen, but no reason not to check.