Check for buffer overflow for rail/lightning surfaces