A combination of the above, and multiple scriptures ... "All Scripture is God-breathed ...", Jesus making arguments that rely upon the very letters and less of certain passages being exact, there are many passages that speak to this sort of thing.
Now, no one (at least no serious scholar) claims infalability for the versions that we have today. We claim infalability of the original autographs. Our Bibles today are infallable in so much as they adhere to those originals. There have been a couple of minor copyists errors here and there that we know of. However, the art and science of studying and comparing the tens of thousands of manuscripts we have give us a very high degree of assurance that what we have is very nearly what was originally penned. For instance, in the New Testament, there is question or debate on less than 2% of the text, and those passages that are somewhat in question, even if every single one were removed, would not endanger or alter or cause us to call into questioning any single orthodox teaching of the historic Christian faith.