The Canadian stock market ended higher on Wednesday, with firm crude oil prices triggering some strong buying in the energy space.