The solution of a one-dimensional Stefan problem