Think Sao Paulo is worse to be honest. Lots of muggings in the constant traffic jams on the Marginal (M25 equivalent). Sao Paulo is a toilet of a place - avoid.
Spot on. Keep to the areas nearer the beaches rather than further back in Rio, if you want to do any sightseeing (Corcovado and Sugar Loaf mountain are must-dos) use your hotel concierge to sort it out or a reputable tour group. Don't carry lots of cash or cards, don't wear a flash watch and...