SoCal, I have read here many times about a maximum permanency without visa while in transit, but there is no such limitation. The law is the "Estatuto dos Estrangeiros" and the link follows (in Portuguese only):
http://www.planalto.gov.br/ccivil_03...5compilado.htm
There, at Capítulo I / Artigo 8 / Parágrafo 2:
"Não se exigirá visto de trânsito ao estrangeiro em viagem contínua, que só se interrompa para as escalas obrigatórias do meio de transporte utilizado."
which, in a free translation, is
"It will not be asked for a transit visa to an alien in a continuous trip which would be interrupted only for the necessary changes or stops (escalas) required by the transportation being used"
There is no mentioning in the law about any maximum transit time, so it does not exists. In Brazil, most laws are frequently "interpreted", but any implementation of such maximum transit time would necessitate a modification to the law (meaning: it is not up to the Polícia Federal or any other agent to implement a restriction above or beyond the law).
What I don't know is: upon check-in, is it reasonable to expect the airline agent to know the law?
How does Timatic (which probably will be used by the agent) lists such a round-trip? At the least, arrive at the airport with plenty of time . . .