Stability of one-dimensional heteroclinic connections