Stability of a two-component Bose-Einstein condensate