How safe is cat food for dogs?



I have a Pekingnese that will be 16 in April. I have trouble giving him medicine. He can be persnickery with dog food and sometimes I waste medicine trying to give it to him in his dog food. He will take it quite readily in cat food. For some reason he loves cat food but the cats really could care less about dog food. Will too much cat food cause harm? I know it can lead to diarrhea.