The partial differential equations governing two-dimensional thermosolutal convection in a Boussinesq fluid with free boundary conditions have been solved numerically in a regime where oscillatory solutions can be found. A systematic study of the transition from nonlinear periodic oscillations to temporal chaos has revealed sequences of period-doubling bifurcations. Overstability occurs if the ratio of the solutal to the thermal diffusivity τ < 1 and the solutal Rayleigh number RS is sufficiently large. Solutions have been obtained for two representative values of τ. For τ = 0.316, RS = 104, symmetrical oscillations undergo a bifurcation to asymmetry, followed by a cascade of period-doubling bifurcations leading to aperiodicity, as the thermal Rayleigh number RT is increased. At higher values of RT, the bifurcation sequence is repeated in reverse, restoring simple periodic solutions. As RT is further increased more period-doubling cascades, followed by chaos, can be identified. Within the chaotic regions there are narrow periodic windows, and multiple branches of oscillatory solutions coexist. Eventually the oscillatory branch ends and only steady solutions can be found. The development of chaos has been investigated for τ = 0.1 by varying RT for several different values of RS. When RS is sufficiently small there are periodic solutions whose period becomes infinite at the end of the oscillatory branch. As RS is increased, chaos appears in the neighbourhood of these heteroclinic orbits. At higher values of RS, chaos is found for a broader range in RT. A truncated fifth-order model suggests that the appearance of chaos is associated with heteroclinic bifurcations.