Hosts Morocco missed the chance to secure qualification for the knockout phase of the Africa Cup of Nations after drawing 1-1 with Mali on Friday, but Mohamed Salah's penalty gave Egypt a 1-0 win over South Africa which took them through to the last 16.