Protection against invalid sizes.