I've been involved in two dog attacks. In both cases dogs running at large were the beginning of the problem.
The first one was a mixed breed medium sized dog, actually there were three running together but only one was aggressive. This took place in an urban neighborhood with several people being chased (none were bitten) but dog's owner was not present. I observed the above mentioned actions of persons and the dogs. As I was walking on the street all three dogs approached me. The aggressive one leading the other two hanging back. As the dog slowly approached with hair along it's back up and growling it came within two feet of my right leg I attempted to talk calmly to get the dog to go away. This failed, I am a Concealed Carry Gun Permit holder I shot and killed the dog with one shot to it's head at very close range.
The second incident took place several years later. Again, dog running at large no owner present, and numerous persons pursued by in this case a Pit Bull Terrier. Dog had chased a elderly lady delivering Meals on Wheels and a mother with small child into houses as dog attempted to attack them. The dog came running at me and I used legally carried handgun to shoot the dog. One shot one kill.
The Dog Law of PA gives people the right to protect themselves and others in these type attacks. Look up Title 3 P.S., Agriculture, Chapter 8, Dog Law, Article V Offenses By Dogs, Section 459-501 Killing Dogs. You'll see dogs pursuing OR attacking persons, livestock, and other dogs may be killed with no liability to person doing so. Of course the action of the dog must be IN PROGRESS at the time.
In both the above mentioned incidents there was no civil nor criminal liability on my part.
I would urge any readers to fully understand your rights under the Law before taking any action however.