Mr. Anwar served six years in prison before the sodomy conviction was overturned .