The principle of buyer beware (“caveat emptor“) applies to any purchase of a business. It is up to you to ensure that the business is worth buying.
Therefore you must thoroughly investigate the company and its affairs. The purchase agreement should also contain sufficient warranty and indemnity protection for you. This helps to elicit further information about the company as well as providing some remedy if the seller does not disclose material issues.