The owner of the dog really needs to be reprimanded; otherwise he will more than likely keep doing the same thing. You really should not have to say anything to the dog’s owner, if you confront the guy the dog might think you mean harm to the guy, and attack you. Call 911 and let the police tell the guy that the dog should not be running free,
The next victim might not be as knowledgeable about dogs as you. They might scream, run or anything that would make the dog think he should attack. The dog is doing only what he has been allowed to do so he thinks he is doing what he should.