This question already has an answer here:
I am a Botswana citizen. In October 2018, I was deemed undesirable by South Africa for overstaying two days and was given a one-year ban.
I have to travel to Malaysia in January 2019. I am concerned whether I will be allowed or face any problems flying via South Africa. I have a flight from Botswana to South Africa, then to Hong Kong and on to Malaysia. Will I have a problem entering South Africa or will they grant me access as long as I am in transit?