Generally, when a buyer purchases your company stock (and presumably, this is a purchase for all of the outstanding and issued shares), the buyer is purchasing all of the rights and obligations that go with the business.

It's the buyer's obligation to do what's known as "due diligence": that is, to ensure that no stone is left unturned in investigating the financial condition of the company and possible liabilities. It's your obligation as the seller (in order to avoid charges of fraud) to make full disclosure.

Ideally, you should have (and have had) insurance coverage in place up to the date that ownership transfers, so if any unforeseen claim occurs after the date of transfer, the new buyer has the comfort of knowing there is coverage in place. Best to talk to your commercial insurance broker and your attorney to ensure you're "covered" when handling the sale.