Ivanovic, a former No. 1 seeded 11th, won the title at Roland Garros in 2008, and lost in the final the year before.
Safarova, meanwhile, came into the day with only a 2-7 record in third-round matches at Grand Slam tournaments and only once, in 2007, made it as far as the fourth round at the French Open.
But she improved to 5-2 against Ivanovic, who could not find the mark Saturday. Ivanovic finished with 30 unforced errors, 12 more than Safarova.
Safarova will face 2009 Roland Garros champion Svetlana Kuznetsova for a spot in the quarterfinals. No. 27 seed Kuznetsova defeated No. 5 seed Petra Kvitova, 6-7 (3), 6-1, 9-7 in three hours, 13 minutes.