I also found this on another forum where someone asked the same question:
When I originally booked the flight two weeks ago, I had a 12 hour, overnight layover in Sao, Paolo. The airline, TAM changed the booking at my request because the agent had noted on my reservation that he had advised me that I would not need a visa.
According to the Consulate of Brazil located in Boston, if one is in transit and not staying overnight (key!) and does not leave the transit area then one does not need a Visa. They state, "However, if you are only in transit through a Brazilian airport on your way to another country and do not plan to leave the transit area of the airport, you won’t need a visa, although it would be advisable to apply for one, considering that it is always possible that an international flight may be delayed or even cancelled due to unforeseen reasons and you might be interested in leaving the airport transit area."