I work for a software company. When someone buys a product from us they get a time-limited warranty (at least several months, depending on the product, the price, and other things). After that they pay for fixes. Just like our hardware products really.
Our software is specified to fulfill a set of requirements, and that's how to determine if there's a warranty issue or not.
As for OSS, it could be given away for free, or sold. A reason to sell it for money could be to provide a warranty, which could make it interesting for customers to actually pay for OSS.