You should be fine as long as you don't dress flashy and stay within 2-3 blocks of the beach in Copacabana and Ipanema. Use your common sense, don't get stupid drunk and separated from your friends hitting on strangers at 4am. If you stay holed up in your hotel you will really miss out on what Rio has to offer.