In a single shot weapon the only thing that matters is chambering. The bullet can be loaded as long as you want, generally so it just touches the rifling.
In a repeating firearm, the magazine is the limiting factor. The round must not be too long. It must fit the magazine and feed properly. In a lever action repeater, the loading mechanism dictates how long the round can be. These mechanisms generally are fairly picky about OAL.