I've had people's dogs run at me, too. We had some insane ones, here, that bit three different people, who were walking past the house, on a public street, sending one old lady to the hospital and the owner thought it was funny and told everyone that it was provoked because his dogs don't like the way Nordic walking sticks flash.
Had a bunch (like 5!) of rabid rottweilers run straight at my mother and I, and a jogger, at a public park, last summer. The owner literally, running after them, screaming at them, telling us that they're just being friendly, cuz the jogger immediately had his mace out.
Also had two dogs run out of someone's backdoor, like that, and they attacked our dog and she needed surgery. My father had to beat them off of her with a big stick. And we threatened to sue the owner into oblivion and had some lawyers send him a 10-page letter, so they, thankfully, got put down.
At this point, I'd probably immediately shoot any dog running at me, if I could. To protect both myself and the next person who walks past. If it runs wild, it's a wild animal, and the owners should expect it to be shot. Period. Keep it on a leash or behind a fence.
Many modern "housepets" are essentially hyenas or packs of wolves, but too stupid to be afraid of humans, like a wild animal would be.
/rant